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

报错ValueError: Auto nesting doesn't know how to process an input object of type int. Accepted types: Tensors, or lists/tuples of them #5

Open
wuzuowuyou opened this issue Oct 14, 2020 · 2 comments

Comments

@wuzuowuyou
Copy link

ValueError: Auto nesting doesn't know how to process an input object of type int. Accepted types: Tensors, or lists/tuples of them

在pytorch1.1 cuda10上是可以的,但是在pytorch1.0 cuda8上面就报上面的错误。trace的时候
traced_script_module = torch.jit.trace(self.dla, x)

@wuzuowuyou
Copy link
Author

折腾几个小时已经解决,把class IDAUP的forward
def forward(self, layers, startp, endp):
startp, endp是int形的,转成tensor,再在forward里面解析出int
endp = endp.cpu().numpy()[0]

解决方案如上,在此记录一下!

@wolfworld6
Copy link

转成tensor

how to do it?could you show?

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