projects
/
platform
/
upstream
/
tvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
82610aa
)
match pytorch 1.6 googlenet pretrained model (#6201) (#6212)
author
wjliu
<wjliu1998@gmail.com>
Wed, 5 Aug 2020 20:02:36 +0000
(
04:02
+0800)
committer
GitHub
<noreply@github.com>
Wed, 5 Aug 2020 20:02:36 +0000
(
05:02
+0900)
tests/python/frontend/pytorch/test_forward.py
patch
|
blob
|
history
diff --git
a/tests/python/frontend/pytorch/test_forward.py
b/tests/python/frontend/pytorch/test_forward.py
index
ab9cca1
..
e370cd5
100644
(file)
--- a/
tests/python/frontend/pytorch/test_forward.py
+++ b/
tests/python/frontend/pytorch/test_forward.py
@@
-68,7
+68,11
@@
def load_torchvision(model_name):
for channel in range(3):
input_data[:, channel] -= mean[channel]
input_data[:, channel] /= std[channel]
- model = getattr(torchvision.models, model_name)(pretrained=True)
+
+ if model_name.startswith("googlenet"):
+ model = getattr(torchvision.models, model_name)(pretrained=True, aux_logits=True)
+ else:
+ model = getattr(torchvision.models, model_name)(pretrained=True)
model = model.float().eval()
return model, [input_data]