报错代码为:
label = torch.FloatTensor(label)
报错 TypeError: can't convert np.ndarray of type numpy.uint16. The only supported types are: float64, float32, float16, int64, int32, int16, int8, and uint8.
解决方法:
新加语句:
label = label/1.0
lable = torch.FloatTensor(label)