y_prob = model.predict(x)
y_classes = y_prob.argmax(axis=-1)
As suggested here.
More Related Contents:
- How can I use a weight matrix created by a trained neural network to make predictions in another file?
- Keras, How to get the output of each layer?
- How do you create a custom activation function with Keras?
- Deep-Learning Nan loss reasons
- Failed to get convolution algorithm. This is probably because cuDNN failed to initialize,
- Why is TensorFlow 2 much slower than TensorFlow 1?
- NaN loss when training regression network
- Can Keras with Tensorflow backend be forced to use CPU or GPU at will?
- What is the difference between tf.keras and tf.python.keras?
- Can I run Keras model on gpu?
- Keras custom loss function: Accessing current input pattern
- Negative dimension size caused by subtracting 3 from 1 for ‘conv2d_2/convolution’
- Dimension of shape in conv1D
- How to know if underfitting or overfitting is occuring?
- Loading a trained Keras model and continue training
- How to save final model using keras?
- How does Keras handle multilabel classification?
- Keras: .predict returns percentages instead of classes
- Unknown initializer: GlorotUniform when loading Keras model
- How to use fit_generator with multiple inputs
- Multiple outputs in Keras
- How to implement Grad-CAM on a trained network
- keras: how to save the training history attribute of the history object
- How to add and remove new layers in keras after loading weights?
- ‘Tensor’ object has no attribute ‘lower’
- Unexpected keyword argument ‘ragged’ in Keras
- How to add an attention mechanism in keras?
- Can I send callbacks to a KerasClassifier?
- Keras: How to save model and continue training?
- how to implement custom metric in keras?