#include <keras_model.h>
Definition at line 136 of file keras_model.h.
keras::LayerFlatten::LayerFlatten |
( |
| ) |
|
|
inline |
Implements keras::Layer.
Definition at line 121 of file keras_model.cc.
122 vector<vector<vector<float> > >
im = dc->
get_3d();
124 size_t csize = im[0].size();
125 size_t rsize = im[0][0].size();
126 size_t size = im.size() * csize * rsize;
129 for(
size_t i = 0, dst = 0; i < im.size(); ++i) {
130 for(
size_t j = 0; j < csize; ++j) {
131 float *
row = im[i][j].data();
132 for(
size_t k = 0;
k < rsize; ++
k) {
133 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 |
virtual unsigned int keras::LayerFlatten::get_output_units |
( |
| ) |
const |
|
inlinevirtual |
void keras::LayerFlatten::load_weights |
( |
std::ifstream & |
fin | ) |
|
|
inlinevirtual |
The documentation for this class was generated from the following files: