-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0ee418b
commit 36c585e
Showing
3 changed files
with
27 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using RecurrentLayers | ||
using Flux | ||
using Test | ||
|
||
layers = [RNN, GRU, GRUv3, LSTM, MGU, LiGRU, RAN, LightRU, NAS, MUT1, MUT2, MUT3, | ||
SCRN, PeepholeLSTM, FastRNN, FastGRNN] | ||
|
||
@testset "Sizes for StackedRNN with layer: $layer" for layer in layers | ||
wrap = StackedRNN(layer, 2 => 4) | ||
|
||
inp = rand(Float32, 2, 3, 1) | ||
output = wrap(inp) | ||
@test output isa Array{Float32, 3} | ||
@test size(output) == (4, 3, 1) | ||
|
||
inp = rand(Float32, 2, 3) | ||
output = wrap(inp) | ||
@test output isa Array{Float32, 2} | ||
@test size(output) == (4, 3) | ||
end |