@@ -66,19 +66,6 @@ rnn.state = hidden(rnn.cell)
6666reset! (m:: Recur ) = (m. state = m. cell. state0)
6767reset! (m) = foreach (reset!, functor (m)[1 ])
6868
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-
8269flip (f, xs) = reverse (f .(reverse (xs)))
8370
8471function (m:: Recur )(x:: AbstractArray{T, 3} ) where T
@@ -175,18 +162,6 @@ julia> r(rand(Float32, 3, 10)) |> size # batch size of 10
175162RNN (a... ; ka... ) = Recur (RNNCell (a... ; ka... ))
176163Recur (m:: RNNCell ) = Recur (m, m. state0)
177164
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-
190165# LSTM
191166
192167struct LSTMCell{A,V,S}
@@ -259,23 +234,6 @@ julia> l(rand(Float32, 3, 10)) |> size # batch size of 10
259234LSTM (a... ; ka... ) = Recur (LSTMCell (a... ; ka... ))
260235Recur (m:: LSTMCell ) = Recur (m, m. state0)
261236
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-
279237# GRU
280238
281239function _gru_output (Wi, Wh, b, x, h)
@@ -348,19 +306,6 @@ julia> g(rand(Float32, 3, 10)) |> size # batch size of 10
348306GRU (a... ; ka... ) = Recur (GRUCell (a... ; ka... ))
349307Recur (m:: GRUCell ) = Recur (m, m. state0)
350308
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-
364309# GRU v3
365310
366311struct GRUv3Cell{A,V,S}
0 commit comments