"ValueError: Asked to retrieve element 0, but the Sequence has length 0" in Convolutional Neural Network

just_learning

I am using this code: https://github.com/gsurma/image_classifier/blob/master/ImageClassifierCNN.ipynb but I get this error: ValueError: Asked to retrieve element 0, but the Sequence has length 0 on this line: probabilities = model.predict_generator(test_generator, TEST_SIZE) . I followed this suggestion: How can I get rid of getting error through test generator? and I changed the above line to this: probabilities = model.predict(test_generator, TEST_SIZE) but does not work! And this: ValueError: Asked to retrieve element 0, but the Sequence has length 0 has no solution for my case. Any idea what is wrong?

just_learning

After searching I have found that I need to include 2 folders inside "test" folder, where the folder names are "cat" and "dog". In order to see all the test images I changed TEST_SIZE = ... to the total number of the images inside the 2 folders under "test" folder.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Convolutional neural network with grayscale images

How to calculate the number of parameters for convolutional neural network?

Is there an implementation of Convolutional Neural Network available in OpenCV or similar?

What is Depth of a convolutional neural network?

Calculate dimension of feature maps in convolutional neural network

Trouble understanding Convolutional Neural Network

A simple Convolutional neural network code

Dimensions in convolutional neural network

Reducing Filter Size in Convolutional Neural Network

Is this basic convolution performed in ordinary convolutional neural network?

What is "linear projection" in convolutional neural network

Accuracy decreases convolutional neural network

How to prevent a lazy Convolutional Neural Network?

Overfitting in convolutional neural network

what should be the dimension of image in Convolutional neural network

What does output of Convolutional neural network implies

Convolutional Neural Network visualization - weights or activations?

Resume training convolutional neural network

Groups in Convolutional Neural Network / CNN

Convolutional Neural Network (CNN) input shape

Optimization of Hyperparameter in a Convolutional Neural Network

Convolutional Neural Network for time-dependent features

TensorFlow Convolutional Neural Network tutorial

Convolutional neural network using openCV

Convolutional Neural Network with Extra Parameters

Convolutional Neural Network Loss

Constant Bias in Convolutional Neural Network

PCA Implementation on a Convolutional Neural Network

Multi Output Convolutional Neural Network