- 博客(2)
- 收藏
- 关注
原创 动手学深度学习pytorch版:can‘t convert np.ndarray of type numpy.object_. The only supported types are: float6
在2.2.3节转换张量格式中一段代码运行报错“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.”所以需要先转换成numpy数组格式。
2024-09-16 18:03:34
2137
1
原创 动手学深度学习pytorch版:处理缺失值报错:can only concatenate str (not “int“) to str解决方法
这段代码的问题在于,inputs.mean()函数试图将一个字符串()直接相加或连接,但这两个类型之间不能直接进行这样的操作。我们只对第一列的数字做缺失值处理,因为数字可以取平均值。
2024-09-16 17:10:52
486
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人