Add tests
This commit is contained in:
parent
e0c1c0e057
commit
f7ce717aaa
@ -28,6 +28,8 @@ cm = gpu(m)
|
|||||||
x = [1,2,3]
|
x = [1,2,3]
|
||||||
cx = gpu(x)
|
cx = gpu(x)
|
||||||
@test Flux.crossentropy(x,x) ≈ Flux.crossentropy(cx,cx)
|
@test Flux.crossentropy(x,x) ≈ Flux.crossentropy(cx,cx)
|
||||||
|
@test Flux.crossentropy(x,x, weight=1.0) ≈ Flux.crossentropy(cx,cx, weight=1.0)
|
||||||
|
@test_broken Flux.crossentropy(x,x, weight=[1.0;2.0;3.0]) ≈ Flux.crossentropy(cx,cx, weight=[1.0;2.0;3.0])
|
||||||
|
|
||||||
xs = rand(5, 5)
|
xs = rand(5, 5)
|
||||||
ys = Flux.onehotbatch(1:5,1:5)
|
ys = Flux.onehotbatch(1:5,1:5)
|
||||||
|
Loading…
Reference in New Issue
Block a user