

def as_sparse_or_tensor_variable(x, name=None):
    "\n    Same as `as_sparse_variable` but if we can't make a\n    sparse variable, we try to make a tensor variable.\n\n    Parameters\n    ----------\n    x\n        A sparse matrix.\n\n    Returns\n    -------\n    SparseVariable or TensorVariable version of `x`\n\n    "
    try:
        return as_sparse_variable(x, name)
    except (ValueError, TypeError):
        return theano.tensor.as_tensor_variable(name, name)

dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/sparse/basic.py as_sparse_or_tensor_variable/VarMisuse@45/161 `x`->`name`