def override_theano_function(function):
    @wraps(function)
    def wrapper(actual, expected, *args, **kwargs):
        actual = format_data(actual)
        expected = format_data(expected)

        output = function(actual, expected, *args, **kwargs)
        # use .item(0) to get a first array element and automaticaly
        # convert vector that contains one element to scalar
        return output.eval().item(0)
    return wrapper
Override theano function and help evaluate output result.
dataset/ETHPy150Open itdxer/neupy/neupy/estimators.py/override_theano_function