Skip to content

tensor dont match problem #119

@gmy1234

Description

@gmy1234

File "/Users/gmydl/opt/anaconda3/envs/deepke/lib/python3.8/site-packages/transformers/models/bert/modeling_bert.py", line 985, in forward
buffered_token_type_ids_expanded = buffered_token_type_ids.expand(batch_size, seq_length)
RuntimeError: The expanded size of the tensor (778) must match the existing size (512) at non-singleton dimension 1. Target sizes: [1, 778]. Tensor sizes: [1, 512]

你好 这个问题是因为什么?

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