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

why TypeError? #27

Open
yindahu87 opened this issue Nov 9, 2023 · 2 comments
Open

why TypeError? #27

yindahu87 opened this issue Nov 9, 2023 · 2 comments

Comments

@yindahu87
Copy link

Why am I running Word. py,the following error occurred:
Traceback (most recent call last):
File "C:\GithubProjects\Diffusion-BERT-main\word_freq.py", line 18, in
for iid in data['input_ids']:
TypeError: string indices must be integers

@Hzfinfdu
Copy link
Owner

Hzfinfdu commented Nov 9, 2023

I suspect that train_data should be a datasets.Dataset object but somehow it is a dict now. Did you modify the code around there?

@yindahu87
Copy link
Author

我怀疑那应该是一个数据集。数据集对象,但不知何故它现在是一个字典。你修改了那里的代码吗?train_data

不小心对train_data做了点改动 您是对的 谢谢您

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