RuntimeError: one_hot is only applicable to index tensor.

出现此类错误需要检查tensor的数据格式是否为torch.int64或torch.long,即使是torch.int32也会报错
posted @ 2024-05-23 16:07  Jerez_Li  阅读(7)  评论(0编辑  收藏  举报