Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.ip.pytorch_extractor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.ip.pytorch_extractor
Commits
196988e8
There was a problem fetching the pipeline summary.
Commit
196988e8
authored
7 years ago
by
Guillaume HEUSCH
Browse files
Options
Downloads
Patches
Plain Diff
[test] added docstring in tests
parent
abee8d3b
No related branches found
No related tags found
No related merge requests found
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/ip/pytorch_extractor/test.py
+8
-2
8 additions, 2 deletions
bob/ip/pytorch_extractor/test.py
with
8 additions
and
2 deletions
bob/ip/pytorch_extractor/test.py
+
8
−
2
View file @
196988e8
...
@@ -5,17 +5,23 @@ import os
...
@@ -5,17 +5,23 @@ import os
def
test_cnn8
():
def
test_cnn8
():
"""
test for the CNN8 architecture
this architecture takes 3x128x128 images as input
output an embedding of dimension 512
"""
from
.
import
CNN8Extractor
from
.
import
CNN8Extractor
extractor
=
CNN8Extractor
()
extractor
=
CNN8Extractor
()
# this architecture expects 3x128x128 images
data
=
numpy
.
random
.
rand
(
3
,
128
,
128
).
astype
(
"
float32
"
)
data
=
numpy
.
random
.
rand
(
3
,
128
,
128
).
astype
(
"
float32
"
)
output
=
extractor
(
data
)
output
=
extractor
(
data
)
assert
output
.
shape
[
0
]
==
512
assert
output
.
shape
[
0
]
==
512
def
test_casianet
():
def
test_casianet
():
"""
test for the CasiaNet architecture
this architecture takes 3x128x128 images as input
output an embedding of dimension 320
"""
from
.
import
CasiaNetExtractor
from
.
import
CasiaNetExtractor
extractor
=
CasiaNetExtractor
()
extractor
=
CasiaNetExtractor
()
# this architecture expects 3x128x128 images
# this architecture expects 3x128x128 images
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment