'Extract number from tf.Tensor model
I am using softmax to get the probability vector from a CNN-MFCC based model. I've started to use the command
model(prediction_feature)
instead of
model.predict(prediction_feature)
as I kept getting warning messages while passing the model.predict command over a loop. However, now when I record the probability, the value gets returned in the form:
tf.Tensor(0.00087791355, shape=(), dtype=float32)
instead for just the number 0.00087791355 when I use the model.predict command.
Is there a way to extract just the number from the model(prediction_feature) approach?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
