def test_softmax_generality():
    nvis = 1
    num_classes = 2
    model = MLP(layers=[Softmax(num_classes, 's', irange=0.1)], nvis=nvis)
    Z = T.matrix()
    Y_hat = T.nnet.softmax(Z)
    Y = T.matrix()
    model.layers[-1].cost(Y=Y, Y_hat=Y_hat)
    # The test is just to make sure that the above line does not raise
    # an exception complaining that Y_hat was not made by model.layers[-1]
tests that the Softmax layer can score outputs it did not create
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/models/tests/test_mlp.py/test_softmax_generality