Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
apex
Commits
21c229e0
Commit
21c229e0
authored
Jun 27, 2018
by
Josh Romero
Browse files
Fix to imagenet main.py data normalization.
parent
80479eed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
examples/imagenet/main.py
examples/imagenet/main.py
+2
-2
No files found.
examples/imagenet/main.py
View file @
21c229e0
...
...
@@ -238,8 +238,8 @@ class data_prefetcher():
def
__init__
(
self
,
loader
):
self
.
loader
=
iter
(
loader
)
self
.
stream
=
torch
.
cuda
.
Stream
()
self
.
mean
=
torch
.
tensor
([
0.485
,
0.456
,
0.406
]).
cuda
().
view
(
1
,
3
,
1
,
1
)
self
.
std
=
torch
.
tensor
([
0.229
,
0.224
,
0.22
5
]).
cuda
().
view
(
1
,
3
,
1
,
1
)
self
.
mean
=
torch
.
tensor
([
0.485
*
255
,
0.456
*
255
,
0.406
*
255
]).
cuda
().
view
(
1
,
3
,
1
,
1
)
self
.
std
=
torch
.
tensor
([
0.229
*
255
,
0.224
*
255
,
0.225
*
25
5
]).
cuda
().
view
(
1
,
3
,
1
,
1
)
if
args
.
fp16
:
self
.
mean
=
self
.
mean
.
half
()
self
.
std
=
self
.
std
.
half
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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