testNonContiguous() — pytorch Function Reference
Architecture documentation for the testNonContiguous() function in generate_test_torchscripts.py from the pytorch codebase.
Entity Profile
Relationship Graph
Source Code
android/pytorch_android/generate_test_torchscripts.py lines 113–121
def testNonContiguous(self):
x = torch.tensor([100, 200, 300])[::2]
if x.is_contiguous():
raise AssertionError("expected non-contiguous tensor")
if x[0] != 100:
raise AssertionError("expected x[0] == 100")
if x[1] != 300:
raise AssertionError("expected x[1] == 300")
return x
Domain
Subdomains
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free