#include "keras_model.h"
|
| DataChunk2D (size_t depth, size_t rows, size_t cols, float init) |
|
| DataChunk2D (void) |
|
std::vector< std::vector< std::vector< float > > > & | get_3d_rw () |
|
std::vector< std::vector< std::vector< float > > > const & | get_3d () const |
|
virtual void | set_data (std::vector< std::vector< std::vector< float > > > const &d) |
|
size_t | get_data_dim (void) const |
|
void | show_name () |
|
void | show_values () |
|
void | read_from_file (const std::string &fname) |
|
virtual std::vector< float > const & | get_1d () const |
|
virtual void | set_data (std::vector< float > const &) |
|
Definition at line 55 of file keras_model.h.
keras::DataChunk2D::DataChunk2D |
( |
size_t |
depth, |
|
|
size_t |
rows, |
|
|
size_t |
cols, |
|
|
float |
init |
|
) |
| |
|
inline |
Definition at line 57 of file keras_model.h.
58 data(depth,
std::vector< std::vector<float> >(rows, std::vector<float>(cols, init)))
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
std::vector< std::vector< std::vector< float > > > data
keras::DataChunk2D::DataChunk2D |
( |
void |
| ) |
|
|
inline |
virtual std::vector<float> const& keras::DataChunk::get_1d |
( |
| ) |
const |
|
inlinevirtualinherited |
std::vector< std::vector< std::vector<float> > > const& keras::DataChunk2D::get_3d |
( |
| ) |
const |
|
inlinevirtual |
std::vector< std::vector< std::vector<float> > >& keras::DataChunk2D::get_3d_rw |
( |
| ) |
|
|
inline |
size_t keras::DataChunk2D::get_data_dim |
( |
void |
| ) |
const |
|
inlinevirtual |
void keras::DataChunk2D::read_from_file |
( |
const std::string & |
fname | ) |
|
|
virtual |
Reimplemented from keras::DataChunk.
Definition at line 27 of file keras_model.cc.
References d, fin, and keras::read_1d_array().
28 ifstream
fin(fname.c_str());
32 vector<vector<float> > tmp_single_depth;
33 for(
int r = 0; r <
m_rows; ++r) {
35 tmp_single_depth.push_back(tmp_row);
37 data.push_back(tmp_single_depth);
std::vector< std::vector< std::vector< float > > > data
std::vector< float > read_1d_array(std::ifstream &fin, int cols)
virtual void keras::DataChunk::set_data |
( |
std::vector< float > const & |
| ) |
|
|
inlinevirtualinherited |
virtual void keras::DataChunk2D::set_data |
( |
std::vector< std::vector< std::vector< float > > > const & |
d | ) |
|
|
inlinevirtual |
void keras::DataChunk2D::show_name |
( |
| ) |
|
|
inlinevirtual |
Implements keras::DataChunk.
Definition at line 67 of file keras_model.h.
68 std::cout <<
"DataChunk2D " <<
data.size() <<
"x" <<
data[0].size() <<
"x" <<
data[0][0].size() << std::endl;
std::vector< std::vector< std::vector< float > > > data
void keras::DataChunk2D::show_values |
( |
| ) |
|
|
inlinevirtual |
Implements keras::DataChunk.
Definition at line 71 of file keras_model.h.
References keras::DataChunk::read_from_file().
72 std::cout <<
"DataChunk2D values:" << std::endl;
73 for(
size_t i = 0; i <
data.size(); ++i) {
74 std::cout <<
"Kernel " << i << std::endl;
75 for(
size_t j = 0; j <
data[0].size(); ++j) {
76 for(
size_t k = 0; k <
data[0][0].size(); ++k) {
77 std::cout <<
data[i][j][k] <<
" ";
79 std::cout << std::endl;
std::vector< std::vector< std::vector< float > > > data
std::vector<std::vector<std::vector<float> > > keras::DataChunk2D::data |
int keras::DataChunk2D::m_cols |
int keras::DataChunk2D::m_depth |
int keras::DataChunk2D::m_rows |
The documentation for this class was generated from the following files:
- /cvmfs/larsoft.opensciencegrid.org/products/larreco/v07_10_02/source/larreco/RecoAlg/ImagePatternAlgs/Keras/keras_model.h
- /cvmfs/larsoft.opensciencegrid.org/products/larreco/v07_10_02/source/larreco/RecoAlg/ImagePatternAlgs/Keras/keras_model.cc