def test_calculating_batch_size(self):
    with self.cached_session():
        inputs = np.zeros((64, 3), dtype=np.float32)
        targets = np.zeros((64, 4), dtype=np.float32)
        model = get_model()
        optimizer = gradient_descent.GradientDescentOptimizer(0.001)
        loss = 'mse'
        strategy = mirrored_strategy.MirroredStrategy(['/device:GPU:0', '/device:CPU:0'])
        strategy._require_static_shapes = True
        model.compile(optimizer, loss, distribute=strategy)
        iterator = model._distribution_standardize_user_data(inputs, targets, batch_size=None, check_steps=True, steps_name='steps', steps=3)
        self.assertEqual(10, distributed_training_utils.get_batch_dimension(iterator._iterator))
def test_calculating_batch_size(self):
    with self.cached_session():
        inputs = np.zeros((64, 3), dtype=np.float32)
        targets = np.zeros((64, 4), dtype=np.float32)
        model = get_model()
        optimizer = gradient_descent.GradientDescentOptimizer(0.001)
        loss = 'mse'
        strategy = mirrored_strategy.MirroredStrategy(['/device:GPU:0', '/device:CPU:0'])
        strategy._require_static_shapes = True
        model.compile(optimizer, loss, distribute=strategy)
        iterator = model._distribution_standardize_user_data(inputs, targets, batch_size=None, check_steps=True, steps_name='steps', steps=3)
        self.assertEqual(10, distributed_training_utils.get_batch_dimension(iterator._iterator))