Skip to content

Can Torchdiffeq add support for sparse tensors for y0 #275

@032004129xuzhiyong

Description

@032004129xuzhiyong

I want a very large sparse tensor as an extra parameter. As suggested by the previous question, I put this as part of the status, but it reported an error. Can Torchdiffeq add support for sparse tensors for y0?

(func, y0, t, rtol, atol, method, options, event_fn, SOLVERS)
    218 rtol = _tuple_tol('rtol', rtol, shapes)
    219 atol = _tuple_tol('atol', atol, shapes)
--> 220 y0 = torch.cat([y0_.reshape(-1) for y0_ in y0])
    221 func = _TupleFunc(func, shapes)
    222 if event_fn is not None:

RuntimeError: reshape is not implemented for sparse tensors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions