title: Migrate tf.contrib.layers.batch_norm to Tensorflow 2.0
body: <p>I'm migrating a TensorFlow code to Tensorflow 2.1.0.</p>
  
  <p>Here is the original code:</p>
  
  <pre><code>conv = tf.layers.conv2d(inputs, out_channels, kernel_size=3, padding='SAME')
  conv = tf.contrib.layers.batch_norm(conv, updates_collections=None, decay=0.99, scale=True, center=True)
  conv = tf.nn.relu(conv)
  conv = tf.contrib.layers.max_pool2d(conv, 2)
  </code></pre>
  
  <p>And this is what I've done:</p>
  
  <pre><code>conv1 = Conv2D(out_channels, (3, 3), activation='relu', padding='same', data_format='channels_last', name=name)(inputs)
  conv1 = Conv2D(64, (5, 5), activation='relu', padding='same', data_format="channels_last")(conv1)
  #conv = tf.contrib.layers.batch_norm(conv, updates_collections=None, decay=0.99, scale=True, center=True)
  pool1 = MaxPooling2D(pool_size=(2, 2), data_format="channels_last")(conv1)
  </code></pre>
  
  <p>My problem is that I don't know what to do with <code>tf.contrib.layers.batch_norm</code>.</p>
  
  <p>How can I migrate <code>tf.contrib.layers.batch_norm</code> to Tensorflow 2.x?</p>
  
  <p><strong>UPDATE:</strong><br/>
  Using the comment suggestion, I think I have migrated correctly:</p>
  
  <pre><code>conv1 = BatchNormalization(momentum=0.99, scale=True, center=True)(conv1)
  </code></pre>
  
  <p>But I'm not sure if <code>decay</code> is like <code>momentum</code> and I don't know how to set <code>updates_collections</code> in the <code>BatchNormalization</code> method.</p>