Skip to content

Commit f51a624

Browse files
committed
ND-tensor unit-test for DropoutLayer
1 parent 8013dff commit f51a624

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/layers/dropout.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
function test_dropout_layer(backend::Backend, T, eps)
22
println("-- Testing Dropout on $(typeof(backend)){$T}...")
33

4+
tensor_dim = abs(rand(Int)) % 6 + 1
5+
dims = tuple((abs(rand(Int, tensor_dim)) % 8 + 1)...)
6+
println(" > $dims")
7+
48
ratio = convert(T, 0.6)
5-
input = rand(T, 3, 4, 5, 6)
9+
input = rand(T, dims)
610
input_blob = make_blob(backend, input)
711
diff_blob = make_blob(backend, input)
812

0 commit comments

Comments
 (0)