#include <keras_model.h>
Definition at line 197 of file keras_model.h.
keras::LayerDense::LayerDense |
( |
| ) |
|
|
inline |
Implements keras::Layer.
Definition at line 363 of file keras_model.cc.
368 size_t size8 = size >> 3;
375 for (
size_t j = 0; j <
m_weights.size(); ++j) {
379 for (
size_t i = 0; i < size8; ++i) {
380 y_ret[
k] += w[
k] *
p;
381 y_ret[k+1] += w[k+1] *
p;
382 y_ret[k+2] += w[k+2] *
p;
383 y_ret[k+3] += w[k+3] *
p;
384 y_ret[k+4] += w[k+4] *
p;
385 y_ret[k+5] += w[k+5] *
p;
386 y_ret[k+6] += w[k+6] *
p;
387 y_ret[k+7] += w[k+7] *
p;
390 while (k < size) { y_ret[
k] += w[
k] *
p; ++
k; }
392 for (
size_t i = 0; i <
size; ++i) {
std::vector< std::vector< float > > m_weights
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
std::vector< float > & get_1d_rw()
std::vector< float > m_bias
virtual std::vector< float > const & get_1d() const
virtual unsigned int keras::LayerDense::get_input_cols |
( |
| ) |
const |
|
inlinevirtual |
virtual unsigned int keras::LayerDense::get_input_rows |
( |
| ) |
const |
|
inlinevirtual |
virtual unsigned int keras::LayerDense::get_output_units |
( |
| ) |
const |
|
inlinevirtual |
void keras::LayerDense::load_weights |
( |
std::ifstream & |
fin | ) |
|
|
virtual |
Implements keras::Layer.
Definition at line 91 of file keras_model.cc.
100 tmp_n.push_back(tmp_float);
109 m_bias.push_back(tmp_float);
std::vector< std::vector< float > > m_weights
std::vector< float > m_bias
QTextStream & endl(QTextStream &s)
int keras::LayerDense::m_input_cnt |
int keras::LayerDense::m_neurons |
The documentation for this class was generated from the following files: