Many times after using a view or 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.