@raises(ValueError)
def test_conditional_rejects_invalid_output_layer():
 mlp = MLP(layers=[Linear(layer_name='h', dim=5, irange=0.01), Linear(layer_name='mu', dim=5, irange=0.01)])
 conditional = DummyConditional(mlp=mlp, name='conditional', output_layer_required=False)
 vae = DummyVAE()
 conditional.set_vae(vae)
 conditional.initialize_parameters(input_space=VectorSpace(dim=5), ndim=5)

@ raises ( ValueError ) def test_conditional_rejects_invalid_output_layer ( ) : mlp = MLP ( layers = [ Linear ( layer_name = 'h' , dim = 5 , irange = 0.01 ) , Linear ( layer_name = 'mu' , dim = 5 , irange = 0.01 ) ] ) conditional = DummyConditional ( mlp = mlp , name = 'conditional' , output_layer_required = False ) vae = DummyVAE ( ) conditional . set_vae ( vae ) conditional . initialize_parameters ( input_space = VectorSpace ( dim = 5 ) , ndim = 5 )
conditional rejects invalid user-defined output layer .