Skip to content

Commit 579c12f

Browse files
acburigohouseroad
authored andcommitted
Adjust for latest PyTorch version. (#112)
1 parent 9b03ae6 commit 579c12f

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

tutorials/PytorchOnnxExport.ipynb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,13 @@
9898
"metadata": {},
9999
"outputs": [],
100100
"source": [
101-
"from torch.autograd import Variable\n",
102101
"import torch.onnx\n",
103102
"import torchvision\n",
104103
"\n",
105104
"# Standard ImageNet input - 3 channels, 224x224,\n",
106105
"# values don't matter as we care about network structure.\n",
107106
"# But they can also be real inputs.\n",
108-
"dummy_input = Variable(torch.randn(1, 3, 224, 224))\n",
107+
"dummy_input = torch.randn(1, 3, 224, 224)\n",
109108
"# Obtain your model, it can be also constructed in your script explicitly\n",
110109
"model = torchvision.models.alexnet(pretrained=True)\n",
111110
"# Invoke export\n",

0 commit comments

Comments
 (0)