随笔分类 - 报错
摘要:部分数据输出为NaN,处理这部分异常数据使用isnan()函数 方法一:使用np.nan import numpy as np if z == np.nan: print('error') 方法二: from math import isnan isnan(z) 参考: https://www.cn
阅读全文
摘要:RuntimeError: Input type (torch.cuda.HalfTensor) and weight type (torch.cuda.FloatTensor) should be the same 模型输入的数据类型要与模型参数的数据类型一致。 torch.cuda.HalfTe
阅读全文