Exemplo n.º 1
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);
}
Exemplo n.º 2
0
void bob::learn::boosting::StumpMachine::save(bob::io::base::HDF5File& file) const{
  file.set("Threshold", m_threshold);
  file.set("Polarity", m_polarity);
  file.set("Index", m_index);
  file.setAttribute(".", "MachineType", std::string("StumpMachine"));
}