28 #include "tiny_dnn/layers/layer.h"
35 :
layer({vector_type::data}, {vector_type::data}), shape_(shape) {}
38 :
layer({ vector_type::data }, { vector_type::data }), shape_(
shape3d(in_dim,1,1)) {}
40 std::vector<shape3d>
in_shape()
const override {
return { shape_ }; }
41 std::vector<shape3d>
out_shape()
const override {
return { shape_ }; }
42 std::string
layer_type()
const override {
return "input"; }
47 std::vector<tensor_t*>& out_data)
override {
48 *out_data[0] = *in_data[0];
52 const std::vector<tensor_t*>& out_data,
53 std::vector<tensor_t*>& out_grad,
54 std::vector<tensor_t*>& in_grad)
override {
56 CNN_UNREFERENCED_PARAMETER(in_data);
57 CNN_UNREFERENCED_PARAMETER(out_data);
58 CNN_UNREFERENCED_PARAMETER(out_grad);
59 CNN_UNREFERENCED_PARAMETER(in_grad);
base class of all kind of NN layers
Definition: layer.h:62
layer(const std::vector< vector_type > &in_type, const std::vector< vector_type > &out_type)
Defaul layer constructor that instantiates a N-input, M-output layer.
Definition: layer.h:76