Public Member Functions | Public Attributes | List of all members
keras::DataChunkFlat Class Reference

#include <keras_model.h>

Inheritance diagram for keras::DataChunkFlat:
keras::DataChunk

Public Member Functions

 DataChunkFlat (size_t size)
 
 DataChunkFlat (size_t size, float init)
 
 DataChunkFlat (void)
 
std::vector< float > & get_1d_rw ()
 
std::vector< float > const & get_1d () const
 
void set_data (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)
 
- Public Member Functions inherited from keras::DataChunk
virtual ~DataChunk ()
 
virtual std::vector< std::vector< std::vector< float > > > const & get_3d () const
 
virtual void set_data (std::vector< std::vector< std::vector< float > > > const &)
 

Public Attributes

std::vector< float > f
 

Detailed Description

Definition at line 95 of file keras_model.h.

Constructor & Destructor Documentation

keras::DataChunkFlat::DataChunkFlat ( size_t  size)
inline

Definition at line 97 of file keras_model.h.

97 : f(size) { }
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
std::vector< float > f
Definition: keras_model.h:101
keras::DataChunkFlat::DataChunkFlat ( size_t  size,
float  init 
)
inline

Definition at line 98 of file keras_model.h.

98 : f(size, init) { }
init
Definition: train.py:42
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
std::vector< float > f
Definition: keras_model.h:101
keras::DataChunkFlat::DataChunkFlat ( void  )
inline

Definition at line 99 of file keras_model.h.

99 { }

Member Function Documentation

std::vector<float> const& keras::DataChunkFlat::get_1d ( ) const
inlinevirtual

Reimplemented from keras::DataChunk.

Definition at line 103 of file keras_model.h.

103 { return f; }
std::vector< float > f
Definition: keras_model.h:101
std::vector<float>& keras::DataChunkFlat::get_1d_rw ( )
inline

Definition at line 102 of file keras_model.h.

102 { return f; }
std::vector< float > f
Definition: keras_model.h:101
size_t keras::DataChunkFlat::get_data_dim ( void  ) const
inlinevirtual

Reimplemented from keras::DataChunk.

Definition at line 105 of file keras_model.h.

105 { return 1; }
void keras::DataChunkFlat::read_from_file ( const std::string fname)
inlinevirtual

Reimplemented from keras::DataChunk.

Definition at line 115 of file keras_model.h.

115 {};
void keras::DataChunkFlat::set_data ( std::vector< float > const &  d)
inlinevirtual

Reimplemented from keras::DataChunk.

Definition at line 104 of file keras_model.h.

104 { f = d; };
std::vector< float > f
Definition: keras_model.h:101
void keras::DataChunkFlat::show_name ( )
inlinevirtual

Implements keras::DataChunk.

Definition at line 107 of file keras_model.h.

107  {
108  std::cout << "DataChunkFlat " << f.size() << std::endl;
109  }
std::vector< float > f
Definition: keras_model.h:101
QTextStream & endl(QTextStream &s)
void keras::DataChunkFlat::show_values ( )
inlinevirtual

Implements keras::DataChunk.

Definition at line 110 of file keras_model.h.

110  {
111  std::cout << "DataChunkFlat values:" << std::endl;
112  for(size_t i = 0; i < f.size(); ++i) std::cout << f[i] << " ";
113  std::cout << std::endl;
114  }
std::vector< float > f
Definition: keras_model.h:101
QTextStream & endl(QTextStream &s)

Member Data Documentation

std::vector<float> keras::DataChunkFlat::f

Definition at line 101 of file keras_model.h.


The documentation for this class was generated from the following file: