import torch import torch.nn as nn import torch.optim as optim from torch.autograd import Variable from models.imagenet import mobilenetv2 net = mobilenetv2() net.load_state_dict(torch.load('pretrained/mobilenetv2_1.0-0c6065bc.pth',map_location=torch.device('cpu'))) x = Variable(torch.randn(1, 3, 224, 224)) torch.onnx.export(net, x, 'mobilenetv2_1.0.onnx', verbose=True, opset_version=10)
There was an error while loading. Please reload this page.