def test_batch_normalized_mlp_allocation():
 mlp = BatchNormalizedMLP([Tanh(), Tanh()], [5, 7, 9])
 mlp.allocate()
 assert (mlp.activations[0].children[0].input_dim == 7)
 assert (mlp.activations[1].children[0].input_dim == 9)
 assert (not any((l.use_bias for l in mlp.linear_transformations)))

def test_batch_normalized_mlp_allocation ( ) : mlp = BatchNormalizedMLP ( [ Tanh ( ) , Tanh ( ) ] , [ 5 , 7 , 9 ] ) mlp . allocate ( ) assert ( mlp . activations [ 0 ] . children [ 0 ] . input_dim == 7 ) assert ( mlp . activations [ 1 ] . children [ 0 ] . input_dim == 9 ) assert ( not any ( ( l . use_bias for l in mlp . linear_transformations ) ) )
test that batchnormalizedmlp performs allocation correctly .