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

TorchScript ops.prim.NumToTensor(torch.size) #429

Closed
lutzroeder opened this issue Feb 15, 2020 · 0 comments
Closed

TorchScript ops.prim.NumToTensor(torch.size) #429

lutzroeder opened this issue Feb 15, 2020 · 0 comments

Comments

@lutzroeder
Copy link
Owner

lutzroeder commented Feb 15, 2020

https://github.com/lutzroeder/netron/files/3748989/blitz_neural_networks_tutorial.zip

x = torch.max_pool2d(input4, [2, 2], annotate(List[int], []), [0, 0], [1, 1], False)
s = ops.prim.NumToTensor(torch.size(x, 1))
s0 = ops.prim.NumToTensor(torch.size(x, 2))
s1 = ops.prim.NumToTensor(torch.size(x, 3))
num_features = torch.mul(s, CONSTANTS.c0)
num_features0 = torch.mul_(num_features, s0)
_7 = [-1, int(torch.mul_(num_features0, s1))]
input5 = torch.view(x, _7)
@lutzroeder lutzroeder changed the title TorchScript ops.prim.NumToTensor(torch.size(x, 1)) TorchScript ops.prim.NumToTensor(torch.size) Feb 15, 2020
lutzroeder added a commit that referenced this issue Mar 29, 2020
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

1 participant