ValueError: total size of new array must be unchanged

后端 未结 1 1964
一向
一向 2021-01-17 11:59

I am trying to execute the code from this URL. However, I started getting this error:

des = np.array(des,np.float32).reshape((1,128))
ValueError: total size          


        
相关标签:
1条回答
  • 2021-01-17 12:26

    I had the same issue. I found that I changed the data length. A product of reshape arguments should be equal to a length of an array which you are changing. In your case:

    des = np.array(des,np.float32).reshape(1, len(des))
    
    0 讨论(0)
提交回复
热议问题