def test_batch_normalized_mlp_transformed():
 x = tensor.matrix('x')
 mlp = BatchNormalizedMLP([Tanh(), Tanh()], [5, 7, 9])
 with batch_normalization(mlp):
  y = mlp.apply(x)
 assert (len(get_batch_normalization_updates(ComputationGraph([y]))) == 4)

def test_batch_normalized_mlp_transformed ( ) : x = tensor . matrix ( 'x' ) mlp = BatchNormalizedMLP ( [ Tanh ( ) , Tanh ( ) ] , [ 5 , 7 , 9 ] ) with batch_normalization ( mlp ) : y = mlp . apply ( x ) assert ( len ( get_batch_normalization_updates ( ComputationGraph ( [ y ] ) ) ) == 4 )
smoke test that a graph involving a batchnormalizedmlp transforms .