@@ -53,6 +53,7 @@ rnn.state = hidden(rnn.cell)
53
53
reset! (m:: Recur ) = (m. state = m. cell. state0)
54
54
reset! (m) = foreach (reset!, functor (m)[1 ])
55
55
56
+ # TODO remove in v0.13
56
57
function Base. getproperty (m:: Recur , sym:: Symbol )
57
58
if sym === :init
58
59
@warn " Recur field :init has been deprecated. To access initial state weights, use m::Recur.cell.state0 instead."
@@ -100,6 +101,7 @@ output fed back into the input each time step.
100
101
Recur (m:: RNNCell ) = Recur (m, m. state0)
101
102
RNN (a... ; ka... ) = Recur (RNNCell (a... ; ka... ))
102
103
104
+ # TODO remove in v0.13
103
105
function Base. getproperty (m:: RNNCell , sym:: Symbol )
104
106
if sym === :h
105
107
@warn " RNNCell field :h has been deprecated. Use m::RNNCell.state0 instead."
@@ -158,6 +160,7 @@ for a good overview of the internals.
158
160
Recur (m:: LSTMCell ) = Recur (m, m. state0)
159
161
LSTM (a... ; ka... ) = Recur (LSTMCell (a... ; ka... ))
160
162
163
+ # TODO remove in v0.13
161
164
function Base. getproperty (m:: LSTMCell , sym:: Symbol )
162
165
if sym === :h
163
166
@warn " LSTMCell field :h has been deprecated. Use m::LSTMCell.state0[1] instead."
@@ -209,6 +212,7 @@ for a good overview of the internals.
209
212
Recur (m:: GRUCell ) = Recur (m, m. state0)
210
213
GRU (a... ; ka... ) = Recur (GRUCell (a... ; ka... ))
211
214
215
+ # TODO remove in v0.13
212
216
function Base. getproperty (m:: GRUCell , sym:: Symbol )
213
217
if sym === :h
214
218
@warn " GRUCell field :h has been deprecated. Use m::GRUCell.state0 instead."
0 commit comments