为什么老师的im_data.transpose()可以调用多个参数?
来源:4-7 利用神经网络解决分类和回归问题(5)

__喵喵__
2020-05-31
为什么老师的im_data.transpose()可以调用多个参数?
我试的时候报错这样的错误:
TypeError: transpose() received an invalid combination of arguments - got (int, int, int), but expected one of:
- (name dim0, name dim1)
- (int dim0, int dim1)
写回答
1回答
-
一个很坏的好人
2020-05-31
老师把im_data转成numpy格式了, np.transpose()可以接受n个参数
https://numpy.org/doc/stable/reference/generated/numpy.transpose.html
10
相似问题