The posted error is raised, if the tensor it not contiguous in memory and thus view will fail.
You could either use .reshape instead as suggested in the error message or .contiguous().view(...) alternatively.
The posted error is raised, if the tensor it not contiguous in memory and thus view will fail.
You could either use .reshape instead as suggested in the error message or .contiguous().view(...) alternatively.