numpy np.mean()计算平均值
问题描述:完整报错如下:
Traceback (most recent call last): File "test_wq.py", line 88, in原因分析valid_cls(model, im_test_data, sk_test_data) File "test_wq.py", line 54, in valid_cls avg = np.mean(presicion_array) File "<__array_function__ internals>", line 6, in mean File "/root/anaconda3/envs/dpm-pc-gen/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 3373, in mean out=out, **kwargs) File "/root/anaconda3/envs/dpm-pc-gen/lib/python3.7/site-packages/numpy/core/_methods.py", line 160, in _mean ret = umr_sum(arr, axis, dtype, out, keepdims) RuntimeError: The size of tensor a (400) must match the size of tensor b (20) at non-singleton dimension 0
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)