mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-05 04:17:53 +00:00
Workaround for HTTP Error 403: Forbidden for MNIST dataset (#6885)
This commit is contained in:
parent
fedb68429c
commit
ed1883a97c
1 changed files with 8 additions and 0 deletions
|
|
@ -249,6 +249,14 @@ class MNISTWrapper():
|
|||
return ModelDescription([input_desc, label_desc], [loss_desc, probability_desc])
|
||||
|
||||
def get_loaders(self):
|
||||
# TODO: Remove this temporary fix for urllib.error.HTTPError: HTTP Error 403: Forbidden
|
||||
# once a more permanent solution can be found.
|
||||
# Fix as per https://github.com/pytorch/vision/issues/1938#issuecomment-789986996
|
||||
from six.moves import urllib
|
||||
opener = urllib.request.build_opener()
|
||||
opener.addheaders = [('User-agent', 'Mozilla/5.0')]
|
||||
urllib.request.install_opener(opener)
|
||||
|
||||
args_batch_size = 64
|
||||
args_test_batch_size = 1000
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue