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

代码示例有问题 #3409

Merged
merged 1 commit into from
Oct 29, 2022
Merged

代码示例有问题 #3409

merged 1 commit into from
Oct 29, 2022

Conversation

Wang-ck123
Copy link
Contributor

在map()中batched=true时,使用tokenizer进行分词若不设置return_dict=False会生成dict类型,此时在下方for循环中无法使用[idx]来定位,会运行报错,需要设置return_dict=False后才能使用[idx]进行定位。

PR types

PR changes

Description

设置return_dict=False后才能使用idx下标,否则无法使用,运行报错。
@CLAassistant
Copy link

CLAassistant commented Oct 10, 2022

CLA assistant check
All committers have signed the CLA.

@ZeyuChen
Copy link
Member

Thanks for your contributions.

@ZeyuChen ZeyuChen merged commit 9eda9a4 into PaddlePaddle:develop Oct 29, 2022
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

Successfully merging this pull request may close these issues.

3 participants