Last active
January 10, 2023 00:31
-
-
Save JustASquid/376ecc8f6469fb5a4262941c293352ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def f(x): | |
# x has a shape of (batch, 5) with range [0, 1) | |
a = tf.constant([ | |
2324.346923828125, | |
2324.346923828125, | |
1325.14990234375, | |
1325.14990234375, | |
1365.2352294921875 | |
]) | |
x_scaled = (100 * (1 - x) + 10000 * x) | |
return tf.math.reduce_max(a / x_scaled, axis=-1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment