What's new

What does the output of predict_generator means?

Fever

Active member
Staff member
I am trying to predict the test data using predict_generator and i am getting output a "Numpy of arrays" as when i googled, its saying that they are probabilities. I didn't understand what the output or values are. Shape of predicted values is (26, 1).

batch_size = 1
test_generator = generator_of_data(dataset, labels, batch_size, maxlen, vector_dim)
all_test_samples = len(dataset)
steps_epoch = int(math.ceil(all_test_samples / batch_size))
testGen = test_generator
#testGen.reset()
predictions = model.predict_generator(testGen,steps = steps_epoch,verbose=1)
print(np.shape(predictions))
print(predictions)


Numpy of arrays is :

[[0.5308861 ]
[0.5396905 ]
[0.54187196]
[0.5308773 ]
[0.5308861 ]
[0.48453102]
[0.48453102]
[0.4664028 ]
[0.46451277]
[0.72770065]
[0.7277006 ]
[0.66269165]
[0.679774 ]
[0.6405551 ]
[0.64055496]
[0.6311009 ]
[0.64576715]
[0.6826591 ]
[0.70780784]
[0.64045835]
[0.64045817]
[0.68670017]
[0.6867001 ]
[0.5396905 ]
[0.54187196]
[0.5308773 ]]

Continue reading...
 
Top