📅  最后修改于: 2023-12-03 15:04:10.995000             🧑  作者: Mango
tensorflow.math.maximum(x, y, name=None)
import tensorflow as tf
a = tf.constant([1, 2, 3, 4])
b = tf.constant([3, 1, 5, 0])
max_values = tf.math.maximum(a, b)
print(max_values.numpy())
输出如下:
[3 2 5 4]