Class: DNN::Layers::InputLayer
Instance Attribute Summary collapse
-
#shape ⇒ Object
readonly
Returns the value of attribute shape.
Instance Method Summary collapse
- #backward(dout) ⇒ Object
- #forward(x) ⇒ Object
-
#initialize(dim_or_shape) ⇒ InputLayer
constructor
A new instance of InputLayer.
Methods inherited from Layer
Constructor Details
#initialize(dim_or_shape) ⇒ InputLayer
Returns a new instance of InputLayer.
60 61 62 |
# File 'lib/dnn/core/layers.rb', line 60 def initialize(dim_or_shape) @shape = dim_or_shape.is_a?(Array) ? dim_or_shape : [dim_or_shape] end |
Instance Attribute Details
#shape ⇒ Object (readonly)
Returns the value of attribute shape.
58 59 60 |
# File 'lib/dnn/core/layers.rb', line 58 def shape @shape end |
Instance Method Details
#backward(dout) ⇒ Object
68 69 70 |
# File 'lib/dnn/core/layers.rb', line 68 def backward(dout) dout end |
#forward(x) ⇒ Object
64 65 66 |
# File 'lib/dnn/core/layers.rb', line 64 def forward(x) x end |