PyTorch读取数据集精度 float32, mat1 and mat2 must have the same dtype

简单来说,type(xy) =, dtype=‘float 64’
但是,y_pred.dtype = float32,类型冲突。
所以,但凡是np类型的数据,做一个类型转换即可。
PyTorch读取数据集精度 float32, mat1 and mat2 must have the same dtype_第1张图片

你可能感兴趣的:(PyTorch,学习,pytorch)