code: def test_distributed_without_replica_ctx(self):
      batch_size = 3
      resolution = 64
      n_channels = 3
  
      batch = tf.random.uniform(
          [batch_size, resolution, resolution, n_channels]
      )
  
      layer = minibatch_standarddeviation.MiniBatchStandardDeviation()
      layer.build(batch.shape)
      non_distributed = layer.call(batch)
  
      strategy = tf.distribute.MirroredStrategy()
      layer_dist = (
          minibatch_standarddeviation.SyncMiniBatchStandardDeviation()
      )
      layer_dist.build(batch.shape)
  
      with strategy.scope():
          distributed = layer_dist.call(batch)
  
      difference = tf.abs(non_distributed - distributed)
      epsilon = 1e-5
      is_equal = difference < epsilon
  
      self.assertTrue(tf.math.reduce_all(is_equal))
  
file_path: graphics/tensorflow_graphics/projects/gan/minibatch_standarddeviation_test.py
imports: import tensorflow
  from tensorflow_graphics.projects.gan import minibatch_standarddeviation
  from tensorflow_graphics.util import test_case
label_desc: Use image node_id 5 for calling the MinibatchStandarddeviationTest obj's underlying member method code with example usage: obj.test_distributed_without_replica_ctx() without return types