标签: python numpy pytorch
例如,我有一个np数组,其中包含带有np的元素。数组
(5, 10) (10, 10) (32, 10) (2, 10) (48, 10) (72, 10) (42, 10)
如何将这种数组转换为torch.tensor?
TypeError:无法转换numpy.object_类型的np.ndarray。唯一受支持的类型为:float64, float32, float16, int64, int32, int16, int8, and uint8.
float64, float32, float16, int64, int32, int16, int8, and uint8.