def as_sparse_or_tensor_variable(x, name=None):

    try:
        return as_sparse_variable(x, name)
    except (ValueError, TypeError):
        return theano.tensor.as_tensor_variable(x, name)
Same as `as_sparse_variable` but if we can't make a
dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/sparse/basic.py/as_sparse_or_tensor_variable