@@ -66,19 +66,6 @@ rnn.state = hidden(rnn.cell)
66
66
reset! (m:: Recur ) = (m. state = m. cell. state0)
67
67
reset! (m) = foreach (reset!, functor (m)[1 ])
68
68
69
-
70
- # TODO remove in v0.13
71
- function Base. getproperty (m:: Recur , sym:: Symbol )
72
- if sym === :init
73
- Zygote. ignore () do
74
- @warn " Recur field :init has been deprecated. To access initial state weights, use m::Recur.cell.state0 instead."
75
- end
76
- return getfield (m. cell, :state0 )
77
- else
78
- return getfield (m, sym)
79
- end
80
- end
81
-
82
69
flip (f, xs) = reverse (f .(reverse (xs)))
83
70
84
71
function (m:: Recur )(x:: AbstractArray{T, 3} ) where T
@@ -175,18 +162,6 @@ julia> r(rand(Float32, 3, 10)) |> size # batch size of 10
175
162
RNN (a... ; ka... ) = Recur (RNNCell (a... ; ka... ))
176
163
Recur (m:: RNNCell ) = Recur (m, m. state0)
177
164
178
- # TODO remove in v0.13
179
- function Base. getproperty (m:: RNNCell , sym:: Symbol )
180
- if sym === :h
181
- Zygote. ignore () do
182
- @warn " RNNCell field :h has been deprecated. Use m::RNNCell.state0 instead."
183
- end
184
- return getfield (m, :state0 )
185
- else
186
- return getfield (m, sym)
187
- end
188
- end
189
-
190
165
# LSTM
191
166
192
167
struct LSTMCell{A,V,S}
@@ -259,23 +234,6 @@ julia> l(rand(Float32, 3, 10)) |> size # batch size of 10
259
234
LSTM (a... ; ka... ) = Recur (LSTMCell (a... ; ka... ))
260
235
Recur (m:: LSTMCell ) = Recur (m, m. state0)
261
236
262
- # TODO remove in v0.13
263
- function Base. getproperty (m:: LSTMCell , sym:: Symbol )
264
- if sym === :h
265
- Zygote. ignore () do
266
- @warn " LSTMCell field :h has been deprecated. Use m::LSTMCell.state0[1] instead."
267
- end
268
- return getfield (m, :state0 )[1 ]
269
- elseif sym === :c
270
- Zygote. ignore () do
271
- @warn " LSTMCell field :c has been deprecated. Use m::LSTMCell.state0[2] instead."
272
- end
273
- return getfield (m, :state0 )[2 ]
274
- else
275
- return getfield (m, sym)
276
- end
277
- end
278
-
279
237
# GRU
280
238
281
239
function _gru_output (Wi, Wh, b, x, h)
@@ -348,19 +306,6 @@ julia> g(rand(Float32, 3, 10)) |> size # batch size of 10
348
306
GRU (a... ; ka... ) = Recur (GRUCell (a... ; ka... ))
349
307
Recur (m:: GRUCell ) = Recur (m, m. state0)
350
308
351
- # TODO remove in v0.13
352
- function Base. getproperty (m:: GRUCell , sym:: Symbol )
353
- if sym === :h
354
- Zygote. ignore () do
355
- @warn " GRUCell field :h has been deprecated. Use m::GRUCell.state0 instead."
356
- end
357
- return getfield (m, :state0 )
358
- else
359
- return getfield (m, sym)
360
- end
361
- end
362
-
363
-
364
309
# GRU v3
365
310
366
311
struct GRUv3Cell{A,V,S}
0 commit comments