Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: zeros(): argument 'out' (position 2) must be Tensor, not list #28

Closed
tphankr opened this issue Feb 18, 2019 · 2 comments
Closed

Comments

@tphankr
Copy link

tphankr commented Feb 18, 2019

I want to visualizer a model with 3-input and have problem with feed 3-input. This model have three input, this filgure:
image

I conferenced this ideal of Waleed (https://github.com/waleedka)and I visualier 3 patch with 3 input [ 32,6, 25, 25] [ 32,6, 51, 51],[32, 6, 75, 75] with code line:

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

  1. 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, example:
    #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)])
    )

In addition, I successed with the first path with code line:
hl.build_graph(model, torch.zeros([32,6, 25, 25]). And had figure:
image.....................
2) And question more about window size of model visualize. Can we show full model visualize one window or save it ? as we see these below picture, I must to stride many time in oder to take a my model.

image
image

Thank you.

@tphankr
Copy link
Author

tphankr commented Mar 2, 2019

I had a solution:
input_1 = torch.zeros([......])
input_2 = torch.zeros([......])
hl.build_graph(..., (input1, input2, ...,input_n))

Thank you, all.

@waleedka
Copy link
Owner

waleedka commented Mar 4, 2019

Thanks for posting the answer. I'll close this issue then.

@waleedka waleedka closed this as completed Mar 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants