#include "keras_model.h"
Definition at line 144 of file keras_model.h.
keras::LayerFlatten::LayerFlatten |
( |
| ) |
|
|
inline |
Implements keras::Layer.
Definition at line 128 of file keras_model.cc.
References keras::DataChunkFlat::get_1d_rw(), keras::DataChunk::get_3d(), and util::size().
130 vector<vector<vector<float>>> im = dc->
get_3d();
132 size_t csize = im[0].size();
133 size_t rsize = im[0][0].size();
134 size_t size = im.size() * csize * rsize;
137 for (
size_t i = 0, dst = 0; i < im.size(); ++i) {
138 for (
size_t j = 0; j < csize; ++j) {
139 float* row = im[i][j].data();
140 for (
size_t k = 0; k < rsize; ++k) {
141 y_ret[dst++] = row[k];
virtual std::vector< std::vector< std::vector< float > > > const & get_3d() const
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
std::vector< float > & get_1d_rw()
virtual unsigned int keras::LayerFlatten::get_input_cols |
( |
| ) |
const |
|
inlinevirtual |
virtual unsigned int keras::LayerFlatten::get_input_rows |
( |
| ) |
const |
|
inlinevirtual |
std::string keras::Layer::get_name |
( |
| ) |
|
|
inlineinherited |
virtual unsigned int keras::LayerFlatten::get_output_units |
( |
| ) |
const |
|
inlinevirtual |
void keras::LayerFlatten::load_weights |
( |
std::ifstream & |
fin | ) |
|
|
inlinevirtual |
std::string keras::Layer::m_name |
|
inherited |
The documentation for this class was generated from the following files:
- larrecodnn/v09_23_00/source/larrecodnn/ImagePatternAlgs/Keras/keras_model.h
- larrecodnn/v09_23_00/source/larrecodnn/ImagePatternAlgs/Keras/keras_model.cc