ValueErrorTraceback (most recent call last)
<ipython-input-19-e13901a9c79c> in <module>()
2 img.load()
3 data = np.asarray( img, dtype="int32" )
----> 4 data = np.reshape(data, (32, 32, 3))
5 print (data.shape)
6 predictImage(data)
/usr/local/lib/python2.7/dist-packages/numpy/core/fromnumeric.pyc in reshape(a, newshape, order)
277 [5, 6]])
278 """
--> 279 return _wrapfunc(a, 'reshape', newshape, order=order)
280
281
/usr/local/lib/python2.7/dist-packages/numpy/core/fromnumeric.pyc in _wrapfunc(obj, method, *args, **kwds)
49 def _wrapfunc(obj, method, *args, **kwds):
50 try:
---> 51 return getattr(obj, method)(*args, **kwds)
52
53 # An AttributeError occurs if the object does not have
ValueError: cannot reshape array of size 4096 into shape (32,32,3)