single-input, single-output feedforward network
More...
#include <nodes.h>
|
void | backward (const std::vector< tensor_t > &first) override |
| propagate gradient More...
|
|
std::vector< tensor_t > | forward (const std::vector< tensor_t > &first) override |
|
template<typename T > |
void | add (T &&layer) |
|
void | check_connectivity () |
|
template<typename InputArchive > |
void | load_connections (InputArchive &ia) |
|
template<typename OutputArchive > |
void | save_connections (OutputArchive &) const |
|
virtual void | update_weights (optimizer *opt, int batch_size) |
| update weights and clear all gradients
|
|
virtual void | setup (bool reset_weight) |
| setup all weights, must be called before forward/backward
|
|
void | clear_grads () |
|
size_t | size () const |
|
iterator | begin () |
|
iterator | end () |
|
const_iterator | begin () const |
|
const_iterator | end () const |
|
layer * | operator[] (size_t index) |
|
const layer * | operator[] (size_t index) const |
|
serial_size_t | in_data_size () const |
|
serial_size_t | out_data_size () const |
|
template<typename T > |
const T & | at (size_t index) const |
|
template<typename T > |
T & | at (size_t index) |
|
virtual float_t | target_value_min (int out_channel=0) const |
|
virtual float_t | target_value_max (int out_channel=0) const |
|
void | save (std::ostream &os) const |
|
void | load (std::istream &is) |
|
virtual void | load (const std::vector< float_t > &vec) |
|
void | label2vec (const label_t *t, serial_size_t num, std::vector< vec_t > *vec) const |
|
template<typename OutputArchive > |
void | save_model (OutputArchive &oa) const |
|
template<typename InputArchive > |
void | load_model (InputArchive &ia) |
|
template<typename OutputArchive > |
void | save_weights (OutputArchive &oa) const |
|
template<typename InputArchive > |
void | load_weights (InputArchive &ia) |
|
|
typedef std::vector< layerptr_t >::iterator | iterator |
|
typedef std::vector< layerptr_t >::const_iterator | const_iterator |
|
template<typename T > |
void | push_back (T &&node) |
|
template<typename T > |
void | push_back (std::shared_ptr< T > node) |
|
std::vector< tensor_t > | reorder_for_layerwise_processing (const std::vector< tensor_t > &input) |
|
template<typename T > |
void | push_back_impl (T &&node, std::true_type) |
|
template<typename T > |
void | push_back_impl (T &&node, std::false_type) |
|
std::vector< std::shared_ptr< layer > > | own_nodes_ |
|
std::vector< layerptr_t > | nodes_ |
|
single-input, single-output feedforward network
◆ backward()
void tiny_dnn::sequential::backward |
( |
const std::vector< tensor_t > & |
first | ) |
|
|
inlineoverridevirtual |
propagate gradient
- Parameters
-
first | : gradient of cost function(dE/dy) |
worker_index | : id of worker-task |
Implements tiny_dnn::nodes.
◆ forward()
std::vector<tensor_t> tiny_dnn::sequential::forward |
( |
const std::vector< tensor_t > & |
first | ) |
|
|
inlineoverridevirtual |
- Parameters
-
first | input : data vectors |
worker_index | : id of worker-task |
Implements tiny_dnn::nodes.
The documentation for this class was generated from the following file: