waleedka / hiddenlayer

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

What is number input for visulizer model? #27

Closed tphankr closed 5 years ago

tphankr commented 5 years ago

I run this code in Jupyter Notebook,but one error occurs: `import torch import torchvision.models import hidden layer as hl model = torchvision.models.vgg16() hl.build_graph(model, torch.zeros([1, 3, 224, 224]))'

And now, I want to feed three inputs are [ 32,6, 25, 25] [ 32,6, 51, 51],[32, 6, 75, 75]. I wrote : hl.build_graph(net, torch.zeros( [ 32,6, 25, 25], [ 32,6, 51, 51], [32, 6, 75, 75] )

But my code had the error: TypeError: zeros(): argument 'out' (position 2) must be Tensor, not list. How do I fix this problem? (I also tried many ways, ex:

hl.build_graph(net, torch.zeros( 32,6, 25, 25), torch.zeros(32, 6, 51, 51), torch.zeros(32, 6, 75, 75))

hl.build_graph(net, torch.zeros(( 32,6, 25, 25), ( 32,6, 51, 51), ( 32,6, 75, 75)))

hl.build_graph(net, torch.zeros([( 32,6, 25, 25)],[( 32,6, 51, 51)],[( 32,6, 75, 75)])

)

Thank you.

waleedka commented 5 years ago

Closing this because you already solved it in another thread.