Skip to content

What is the Flax equivalent of Tensorflow functions? #916

Answered by marcvanzee
marcvanzee asked this question in Q&A
Discussion options

You must be logged in to vote

I'm listing some Tensorflow functions below for which users asked what the equivalent is in Flax.

TF Function Flax/jax Function
tf.identity lambda x: x
tf.name_scope() "Create submodule" [1]
tf.print host_callback.id_print
tf.keras.initializers.Constant lambda rng: 1.0

[1] Putting anything inside a new Module would have that effect. You can also always give submodules a name explicitly with the name=... kwarg to the submodule constuctor.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@avital
Comment options

Answer selected by marcvanzee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #899 on January 21, 2021 09:39.