0

I am a beginner in Deep Learning and while performing a practical assignment, came across the Keras documentation on keras.backend.

I went through the explanation a number of times. however, i cannot exactly understand the difference between max and argmax function.

1 Answers1

0

argmax is the index of maximum in an array and max is maximum value in that array. Please check the example given below

import tensorflow as tf
x = tf.constant([1,10,2,4,15])
print(tf.keras.backend.argmax(x, axis=-1).numpy()) # output 4 (index of max value 15, which is 4)
print(tf.keras.backend.max(x, axis=-1).numpy()) # output 15
Vishnuvardhan Janapati
  • 3,088
  • 1
  • 16
  • 25