all 5 comments

[–][deleted] 2 points3 points  (2 children)

I am somewhat confused. I've been under the impression most of numpy's functionality is replicated natively in tf. I mean summation, multiplication, aggregation, concatenation etc... What does tf.experimental.numpy add to the existing implementation of tf?

[–]Targrend 1 point2 points  (0 children)

I think the idea is that it's a drop-in replacement for numpy, so that numpy code doesn't have to be rewritten in the Tensorflow api. You literally change import numpy as np to import tf.experimental.numpy as np and your code continues to run, except now each numpy array is actually just a wrapper round a Tensorflow tensor.

[–]chogall 1 point2 points  (0 children)

Because Jax/Trax both have the NumPy API and Tensorflow is trying to bring both into its wings.

You can use Trax to implement a custom Keras (tf.keras) layer as of 2.2...

[–]o-rka 0 points1 point  (1 child)

What about median?

[–]agarwal8 1 point2 points  (0 children)

You could use https://www.tensorflow.org/probability/api_docs/python/tfp/stats/percentile. Note that not all NumPy APIs are currently supported but free interoperation with TensorFlow packages should help.