File tree Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change 90
90
end
91
91
end
92
92
93
- @testset " RNN-input-state-eltypes" begin
94
- @testset for R in [RNN, GRU, LSTM, GRUv3]
95
- m = R (3 => 5 )
96
- x = rand (Float64, 3 , 1 )
97
- Flux. reset! (m)
98
- @test_throws MethodError m (x)
99
- end
100
- end
101
-
102
93
@testset " multigate" begin
103
94
x = rand (6 , 5 )
104
95
res, (dx,) = Flux. withgradient (x) do x
Original file line number Diff line number Diff line change 290
290
x32 = rand (Float32, 10 )
291
291
@test eltype (m[1 ]. weight) == Float32
292
292
@test eltype (m (x32)) == Float32
293
- @test eltype (m (x64)) == Float64
294
- @test eltype (f64 (m)(x32)) == Float64
293
+ @test eltype (m (x64)) == Float32 # fixed by _match_eltype
294
+ @test eltype (f64 (m)(x32)) == Float64 # _match_eltype promotes, Julia would too
295
295
@test eltype (f64 (m)(x64)) == Float64
296
296
@test eltype (f64 (m)[1 ]. weight) == Float64
297
297
@test eltype (f32 (f64 (m))[1 ]. weight) == Float32
You can’t perform that action at this time.
0 commit comments