Commit a0ec342f authored by Guillaume HEUSCH's avatar Guillaume HEUSCH

[test] added unit test for LightCNNs with 29 layers

parent e11e6883
Pipeline #26466 passed with stage
in 8 minutes and 30 seconds
......@@ -41,6 +41,24 @@ def test_architectures():
output, emdedding = net.forward(t)
assert output.shape == torch.Size([1, 79077])
assert emdedding.shape == torch.Size([1, 256])
# LightCNN29
a = numpy.random.rand(1, 1, 128, 128).astype("float32")
t = torch.from_numpy(a)
from ..architectures import LightCNN29
net = LightCNN29()
output, emdedding = net.forward(t)
assert output.shape == torch.Size([1, 79077])
assert emdedding.shape == torch.Size([1, 256])
# LightCNN29v2
a = numpy.random.rand(1, 1, 128, 128).astype("float32")
t = torch.from_numpy(a)
from ..architectures import LightCNN29v2
net = LightCNN29v2()
output, emdedding = net.forward(t)
assert output.shape == torch.Size([1, 79077])
assert emdedding.shape == torch.Size([1, 256])
# DCGAN
d = numpy.random.rand(1, 3, 64, 64).astype("float32")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment