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
nni
Commits
475a57d8
"docs/git@developer.sourcefind.cn:OpenDAS/nni.git" did not exist on "3f934d495a43ac8034385ad959c0d62a266f7233"
Unverified
Commit
475a57d8
authored
Mar 05, 2020
by
chicm-ms
Committed by
GitHub
Mar 05, 2020
Browse files
mnist downlaod workaround (#2122)
parent
444d2d7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
examples/trials/mnist-pytorch/mnist.py
examples/trials/mnist-pytorch/mnist.py
+7
-0
No files found.
examples/trials/mnist-pytorch/mnist.py
View file @
475a57d8
...
...
@@ -15,6 +15,13 @@ import torch.nn.functional as F
import
torch.optim
as
optim
from
torchvision
import
datasets
,
transforms
# Temporary patch this example until the MNIST dataset download issue get resolved
# https://github.com/pytorch/vision/issues/1938
import
urllib
opener
=
urllib
.
request
.
build_opener
()
opener
.
addheaders
=
[(
'User-agent'
,
'Mozilla/5.0'
)]
urllib
.
request
.
install_opener
(
opener
)
logger
=
logging
.
getLogger
(
'mnist_AutoML'
)
...
...
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