Skip to content

TypeError: empty() received an invalid combination of arguments - got (tuple, dtype=str, device=str), but expected one of: #46

@Fucheng-Wu

Description

@Fucheng-Wu

File "/home/software/anaconda3/envs/man/lib/python3.10/site-packages/torch/nn/modules/sparse.py", line 142, in init
self.weight = Parameter(torch.empty((num_embeddings, embedding_dim), **factory_kwargs),
TypeError: empty() received an invalid combination of arguments - got (tuple, dtype=str, device=str), but expected one of:

  • (tuple of ints size, *, tuple of names names, torch.memory_format memory_format, torch.dtype dtype, torch.layout layout, torch.device device, bool pin_memory, bool requires_grad)
  • (tuple of ints size, *, torch.memory_format memory_format, Tensor out, torch.dtype dtype, torch.layout layout, torch.device device, bool pin_memory, bool requires_grad)
    卡在最后一步运行不了

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