예제 #1
0
void bob::ip::gabor::JetStatistics::save(bob::io::base::HDF5File& hdf5, bool saveTransform) const{
  hdf5.setArray("MeanAbs", m_meanAbs);
  hdf5.setArray("VarAbs", m_varAbs);
  hdf5.setArray("MeanPhase", m_meanPhase);
  hdf5.setArray("VarPhase", m_varPhase);
  if (saveTransform && m_gwt){
    hdf5.createGroup("Transform");
    hdf5.cd("Transform");
    m_gwt->save(hdf5);
    hdf5.cd("..");
  }
}
예제 #2
0
  void Machine::save (bob::io::base::HDF5File& config) const {

    config.setAttribute(".", "version", 1);
    config.setArray("input_sub", m_input_sub);
    config.setArray("input_div", m_input_div);
    config.setArray("weights", m_weight);
    config.setArray("biases", m_bias);
    config.createGroup("activation");
    config.cd("activation");
    m_activation->save(config);
    config.cd("..");

  }
예제 #3
0
void bob::learn::em::GMMMachine::save(bob::io::base::HDF5File& config) const {
  int64_t v = static_cast<int64_t>(m_n_gaussians);
  config.set("m_n_gaussians", v);
  v = static_cast<int64_t>(m_n_inputs);
  config.set("m_n_inputs", v);

  for(size_t i=0; i<m_n_gaussians; ++i) {
    std::ostringstream oss;
    oss << "m_gaussians" << i;

    if (!config.hasGroup(oss.str())) config.createGroup(oss.str());
    config.cd(oss.str());
    m_gaussians[i]->save(config);
    config.cd("..");
  }

  config.setArray("m_weights", m_weights);
}