报错内容类似于:
RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.FloatTensor) should be the same
或者
Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument index in method wrapper__index_select)
报错内容类似于: RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.FloatTensor) should be the same 或者 Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument index in method wrapper__index_select)
修复方案: 将list修改为modulelist 如model/mlp/mlp_mixer.py文件中(49行): 将self.mlp_blocks=[]修改为self.mlp_blocks=nn.ModuleList([])