示例#1
0
void InitArduino(Handle<Object> exports) {

    SetMemberFunc(exports);

    SetConst(exports);

    SetEnumConst(exports);

    SetGlobalVarFunc(exports);
}
示例#2
0
void LinearLayer::setup() {
  assert(has_bottom_layer());
  
  initialize_weights();
  
  initialize_bias();
  
  m_batch_average_vector = new DataCPU(1, get_bottom_layer()->get_output()->get_num_samples());
  SetConst(1).execute(m_batch_average_vector);
  
  m_output = new DataCPU(get_bottom_layer()->get_output()->get_num_samples(),
                         1,
                         1,
                         m_num_hidden);
  
  //provide the error to the layer below
  m_backprop_error = new DataCPU(get_bottom_layer()->get_output()->get_num_samples(),
                                 1,
                                 1,
                                 get_bottom_layer()->get_output()->get_count_per_sample());
}