waleedka / hiddenlayer

Neural network graphs and training metrics for PyTorch, Tensorflow, and Keras.
MIT License
1.79k stars 266 forks source link

module 'torch.onnx' has no attribute 'OperatorExportTypes' #9

Closed geekac closed 5 years ago

geekac commented 5 years ago

I run this code in Jupyter Notebook,but one error occurs: `import torch import torchvision.models import hiddenlayer as hl

VGG16 with BatchNorm

model = torchvision.models.vgg16()

Build HiddenLayer graph

Jupyter Notebook renders it automatically

hl.build_graph(model, torch.zeros([1, 3, 224, 224]))`

AttributeError: module 'torch.onnx' has no attribute 'OperatorExportTypes'

And I run the code under Ubuntu16.04, pytorch 0.4.0