nestedtensor
nestedtensor copied to clipboard
Bugged if statement
Reading up on the repo and came across this codeline with an if statement that looks bugged. Changing getattr to hasattr should fix things.
https://github.com/pytorch/nestedtensor/blob/3e535a7ff0b8c12126fbb202eec9943b7e7ee09d/nestedtensor/nested/nested.py#L178