admin管理员组

文章数量:1530044

报错:
RuntimeError: Adam does not support sparse gradients, please consider SparseAdam instead

原因:在训练时使用nn.Embedding(sizes[0], dim, sparse=True),这里需要将sparse=True改为sparse=False

本文标签: AdamRuntimeErrorPytorchSupportSparseAdam