Loading...
Searching...
No Matches
tiny_dnn::graph Class Reference

generic graph network More...

`#include <nodes.h>`

Inheritance diagram for tiny_dnn::graph:
[legend]
Collaboration diagram for tiny_dnn::graph:
[legend]

## Public Member Functions

void | backward (const std::vector< tensor_t > &out_grad) override
| propagate gradient
std::vector< tensor_t > | forward (const std::vector< tensor_t > &in_data) override
void | construct (const std::vector< layerptr_t > &input, const std::vector< layerptr_t > &output)
Public Member Functions inherited from tiny_dnn::nodes
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)

## Friends

class | nodes

## Additional Inherited Members

Public Types inherited from tiny_dnn::nodes
typedef std::vector< layerptr_t >::iterator | iterator
typedef std::vector< layerptr_t >::const_iterator | const_iterator
Protected Member Functions inherited from tiny_dnn::nodes
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)
Protected Attributes inherited from tiny_dnn::nodes
std::vector< std::shared_ptr< layer > > | own_nodes_
std::vector< layerptr_t > | nodes_

## Detailed Description

generic graph network

Todo:
  not implemented

## Member Function Documentation

## backward()

void tiny_dnn::graph::backward | ( | const std::vector< tensor_t > & | first | ) |

inline override virtual

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::graph::forward | ( | const std::vector< tensor_t > & | first | ) |

inline override virtual

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:

- tiny_dnn/nodes.h