在处理数据集的时候出现报错:
TypeError: can’t convert np.ndarray of type numpy.object_. The only supported types are: float64, float32, float16, complex64, complex128, int64, int32, int16, int8, uint8, and bool.

train_labels = torch.tensor(
train_data.iloc[0:, [2]].values.reshape(-1, 1), dtype=torch.float32)
这里使用强制转化:.astype(float)
train_labels = torch.tensor(
train_data.iloc[0:, [2]].values.astype(float).reshape(-1, 1), dtype=torch.float32)






![代码随想录day12 | [前、中、后、层]二叉树的遍历迭代法和递归法](https://img-blog.csdnimg.cn/fdef24ebc68a4ae78dedacc14599f9e4.png)







![[Ubuntu 22.04] containerd配置HTTP方式拉取私仓Harbor](https://img-blog.csdnimg.cn/72695eaf029443228e4efda5763ca184.png)





