Change tensorflow 1 code tf.contrib.layers.batch_norm to tensorflow 2

I tried to use these code with tensorflow v2

from tensorflow.contrib.layers.python import layers as tf_layers
tf.contrib.layers.batch_norm(input,activation_fn,reuse,scope)

in this question, Migrate tf.contrib.layers.batch_norm to Tensorflow 2.0 there is ''tf.keras.layers.BatchNormalization''.

but there is no options (activation_fn, reuse, scope).

I need 3 options in tf.contrib.layers.batch_norm(activation_fn, reuse, scope).

How can I use this function?



Read more here: https://stackoverflow.com/questions/66456294/change-tensorflow-1-code-tf-contrib-layers-batch-norm-to-tensorflow-2

Content Attribution

This content was originally published by Mani Man at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: