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: 'torch.Size' object has no attribute 'shape' #3

Open
1973719588 opened this issue Jan 31, 2023 · 2 comments
Open

AttributeError: 'torch.Size' object has no attribute 'shape' #3

1973719588 opened this issue Jan 31, 2023 · 2 comments

Comments

@1973719588
Copy link

您好,请问一下源码在Dailydialog数据集train的时候,会遇到一个问题 AttributeError: 'torch.Size' object has no attribute 'shape'
这里,在做位置编码的时候,您的输入input_shape已经是一个size的属性,不是一个tensor了,不会有shape这个属性,想请问一下哪里不对?
2c6ad59a4f26d7b6daec8b327a2ffb9

629951730bc8ef6cabb8b109d0f8d3e

@WISH-WEI
Copy link

WISH-WEI commented Apr 1, 2023

您好!请问您解决了这个问题嘛??

@vvangzhengyang
Copy link

您好,请问一下源码在Dailydialog数据集train的时候,会遇到一个问题 AttributeError: 'torch.Size' object has no attribute 'shape' 这里,在做位置编码的时候,您的输入input_shape已经是一个size的属性,不是一个tensor了,不会有shape这个属性,想请问一下哪里不对? 2c6ad59a4f26d7b6daec8b327a2ffb9

629951730bc8ef6cabb8b109d0f8d3e

应该是transformers的版本问题

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

3 participants