Skip to content

发现错误的代码 #82

Description

@Victoria-aaaaaa

if 'token_type_ids' in tokenized_output: # 兼容不需要 token_type_id 的模型, e.g. Roberta-Base
if 'token_type_ids' not in tokenized_output:
tokenized_output['token_type_ids'] = [encoded_inputs['token_type_ids']]
else:
tokenized_output['token_type_ids'].append(encoded_inputs['token_type_ids'])
大佬您好,看到units.py里的这段代码应该有一些问题,希望您看一下是否需要删除if 'token_type_ids' in tokenized_output:这行代码

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions