问题:训练网络时出现
ValueError: Using a target size (torch.Size([1, 531])) that is different to the input size (torch.Size([531, 1])) is deprecated. Please ensure they have the same size.问题分析:发现是输出特征数据Y的张量写错了,行列不一致。修改.reshape((1,-1))为.reshape((-1,1)),可以正常训练
问题:训练网络时出现
ValueError: Using a target size (torch.Size([1, 531])) that is different to the input size (torch.Size([531, 1])) is deprecated. Please ensure they have the same size.问题分析:发现是输出特征数据Y的张量写错了,行列不一致。修改.reshape((1,-1))为.reshape((-1,1)),可以正常训练