Many times after using a
transpose function we need to manually apply the
.contiguous() to make the tensor contiguous for further operations.
Usually I get to know about this after getting an error saying make it contiguous.
Is there any tip when to use contiguous option, it’s a bit irritating to wait for errors. Also I have seen that it changed between pytorch version. A code that works in pytorch 0.4 didnt work with pytorch .3 until I used the contiguous option.
Which operations are throwing this error for you? There shouldn’t really be any tensor contiguity expectations, so it’s probably a bug.
Hi, can’t reproduce error again sorry. But it comes a lot after reshape, squeeze and transpose operations.
Link to a Past Question I asked when I faced that error. Although I can’t reproduce it again , probably that error occurred in my model after alot of operations and (possibly) combined effect on them.
Okay, sounds good. Thanks for the report, and if you run into it again please let us know!