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:
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.