[Training Phase] cannot reshape array of size 107100 into shape (89,100,1)
See original GitHub issueWhile trying to play around with the .ipynb, I get the following error
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-5-a59e65dd974e> in <module>
17 image = cv2.imread('Dataset/FistTest/fist_' + str(i) + '.png')
18 gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
---> 19 testImages.append(gray_image.reshape(89, 100, 1))
20
21 testLabels = []
ValueError: cannot reshape array of size 107100 into shape (89,100,1)
The only thing that I’m doing, just to play around, is to modify the network’s structure to this
convnet=input_data(shape=[None,89,100,1],name='input')
convnet=conv_2d(convnet,32,2,activation='relu')
convnet=max_pool_2d(convnet,2)
convnet=conv_2d(convnet,64,2,activation='relu')
convnet=max_pool_2d(convnet,2)
#convnet=conv_2d(convnet,128,2,activation='relu')
#convnet=max_pool_2d(convnet,2)
convnet=conv_2d(convnet,256,2,activation='relu')
convnet=max_pool_2d(convnet,2)
convnet=conv_2d(convnet,256,2,activation='relu')
convnet=max_pool_2d(convnet,2)
convnet=conv_2d(convnet,128,2,activation='relu')
convnet=max_pool_2d(convnet,2)
convnet=conv_2d(convnet,64,2,activation='relu')
convnet=max_pool_2d(convnet,2)
convnet=fully_connected(convnet,1000,activation='relu')
convnet=dropout(convnet,0.75)
convnet=fully_connected(convnet,3,activation='softmax')
convnet=regression(convnet,optimizer='adam',learning_rate=0.001,loss='categorical_crossentropy',name='regression')
model=tflearn.DNN(convnet,tensorboard_verbose=0)
But the crashing point is called before the network’s inizialization so I can’t get, honestly, what’s going wrong 😕
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Cannot reshape array of size into shape - Stack Overflow
I am getting this error: ValueError: cannot reshape array of size 9992 into shape (1,28,28). How do I fix this? In the tutorial...
Read more >Cannot reshape array of size 12288 into shape (64,64)
If you have a third dimension, say RGB images, with three layers of 64×64, you wind up with the desired number of pixels....
Read more >ValueError: cannot reshape array of size 0 into shape ...
I encounter this error when I import and refine a particle subset of a large extraction. I recall someone posted that this could...
Read more >ValueError: cannot reshape array of size - Image.sc Forum
After 200 000 iterations of training I'm trying to evaluate the network by GUI but got this error: ValueError Traceback (most recent call ......
Read more >“ValueError: cannot reshape array of size 278540 into shape ...
I have trained a YOLO v3 Object Detection Model. To incorporate into my flutter application I am trying to convert it to .tflite, ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Solution of Value Error: I got according to my system i make changes into the prediction = model.predict([gray_image.reshape(75,100,1)]). here just prediction = model.predict([gray_image.reshape(89,100,1)]) >>>>>89 change with 75 after made this change I finally solve that ERROR.
@aminhoney Please raise a Pull Request with the fix… I will merge the code into master