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

AttributeError: 'tuple' object has no attribute 'clone' #3

Open
sh7jacobi opened this issue Apr 29, 2021 · 1 comment
Open

AttributeError: 'tuple' object has no attribute 'clone' #3

sh7jacobi opened this issue Apr 29, 2021 · 1 comment

Comments

@sh7jacobi
Copy link

I run following script:

from PyTransformer.transformers.torchTransformer import TorchTransformer
transformer = TorchTransformer()
dot = transformer.visualize(self.model, input_tensor = batch['input'], save_name = "/datasets/fig2")

And I have "AttributeError: 'tuple' object has no attribute 'clone' ". But output of the model is not tuple, this is tensor. Can it work improperly if in forward proragation list is used?

@sh7jacobi
Copy link
Author

I have found error. Algorith work on improperly with function tensor.chunk becaus it returns tuple, not tensor. Could you correct the code?

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