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' #10

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

model = torchvision.models.vgg16()

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

DolphinAC commented 5 years ago

hi,the same error occurs. Do you know how to solve this problems?

waleedka commented 5 years ago

I haven't encountered this issue, but could it be an issue with Pytorch version? The library was tested on PyTorch 0.4.1

jiaobingle commented 5 years ago

@achanger have you solved the issue with pytorch 0.4.1 , thx!

DolphinAC commented 5 years ago

@jiaobingle Yes