pytorch-topological: TypeError: 'PersistenceInformation' object is not iterable
How can I handle non-iterable "PersistenceInformationā in the TopologicalModel
classification model?
The error comes from: pers_info = make_tensor(pers_info)
. I also tried torch.tensor(pers_info)
and got the error that pers_info
is not a sequence.
Finally, pers_info
is the VR complex of weights in a torch.tensor
. I am not sure if that matters.
Thank you.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 33 (17 by maintainers)
Commits related to this issue
- Permitting level 1 nesting for `make_tensor` This fixes issue #16, in which non-nested lists had been passed to the `make_tensor` function, causing a problem. The new code now handles an arbitrary ne... — committed to aidos-lab/pytorch-topological by Pseudomanifold 2 years ago
- Creating tensors with batch-size 1 for lists This is a follow-up to issue #16. The new fix can wrap lists correctly and will create tensors with batch size 1. — committed to aidos-lab/pytorch-topological by Pseudomanifold 2 years ago
- Fixed device creation issue This addresses a follow-up to issue #16. The `make_tensor()` function was losing device information when extending the dimension parameter. Luckily, this can easily be rec... — committed to aidos-lab/pytorch-topological by Pseudomanifold 2 years ago
Sure thing!
bastian.rieck@helmholtz-muenchen.de
Wait, maybe this is documented incorrectly, but the VR complex should also be able to handle a 3D tensor, with the first dimension going over batches.
Very kind of you š Feel free to reach out to discuss this in general!
I think in this case, a viable way could be to try to map an article by an author into a point cloud, then get the persistence diagram as a shape descriptor. If you batch over articles or authors, you can then compare the corresponding representations. Sounds like a very exciting topic to me!