Skip to content

Commit

Permalink
match pytorch 1.6 googlenet pretrained model (apache#6201) (apache#6212)
Browse files Browse the repository at this point in the history
  • Loading branch information
wjliu1998 authored and Trevor Morris committed Aug 26, 2020
1 parent 79d4be4 commit d3b05f2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/python/frontend/pytorch/test_forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit d3b05f2

Please sign in to comment.