Class: DNN::Layers::RNNCell

Inherits:
Object
  • Object
show all
Defined in:
lib/dnn/core/layers/rnn_layers.rb

Overview

Super class of all RNN cells.

Direct Known Subclasses

GRUCell, LSTMCell, SimpleRNNCell

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(weight, recurrent_weight, bias) ⇒ RNNCell

Returns a new instance of RNNCell.



7
8
9
10
11
12
# File 'lib/dnn/core/layers/rnn_layers.rb', line 7

def initialize(weight, recurrent_weight, bias)
  @weight = weight
  @recurrent_weight = recurrent_weight
  @bias = bias
  @trainable = true
end

Instance Attribute Details

#trainableObject

Returns the value of attribute trainable.



5
6
7
# File 'lib/dnn/core/layers/rnn_layers.rb', line 5

def trainable
  @trainable
end