Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.learn.pytorch
Commits
a0ec342f
Commit
a0ec342f
authored
Jan 31, 2019
by
Guillaume HEUSCH
Browse files
[test] added unit test for LightCNNs with 29 layers
parent
e11e6883
Pipeline
#26466
passed with stage
in 8 minutes and 30 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/learn/pytorch/test/test.py
View file @
a0ec342f
...
...
@@ -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"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment