def testBatchSizeInInputGenerator(self):
    with self.session():
      tf.random.set_seed(_TF_RANDOM_SEED)
      p = self._testParams()
      cluster_params = cluster_factory.Cluster.Params()
      cluster_params.mode = 'sync'
      cluster_params.job = 'trainer_client'
      cluster_params.worker.name = '/job:localhost'
      cluster_params.worker.gpus_per_replica = 5
      cluster_params.input.name = '/job:localhost'
      cluster_params.input.replicas = 1
      cluster_params.input.gpus_per_replica = 0
      with cluster_params.Instantiate():
        mdl = p.Instantiate()
        mdl.FPropDefaultTheta()
        loss = mdl.loss
        self.evaluate(tf.global_variables_initializer())
        _ = self.evaluate(loss)
        self.assertEqual(mdl.input_generator.infeed_bucket_batch_limit, [40])