testEmptyShape() — pytorch Function Reference
Architecture documentation for the testEmptyShape() function in PytorchTestBase.java from the pytorch codebase.
Entity Profile
Dependency Diagram
graph TD e1f3bcd4_5fe3_2583_c75e_f56a2ed7d3a4["testEmptyShape()"] fd3711c0_c2a1_0848_309d_ba2ef1be4466["loadModel()"] e1f3bcd4_5fe3_2583_c75e_f56a2ed7d3a4 -->|calls| fd3711c0_c2a1_0848_309d_ba2ef1be4466 style e1f3bcd4_5fe3_2583_c75e_f56a2ed7d3a4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
android/pytorch_android/src/androidTest/java/org/pytorch/PytorchTestBase.java lines 283–293
@Test
public void testEmptyShape() throws IOException {
final Module module = loadModel(TEST_MODULE_ASSET_NAME);
final long someNumber = 43;
final IValue input = IValue.from(Tensor.fromBlob(new long[] {someNumber}, new long[] {}));
final IValue output = module.runMethod("newEmptyShapeWithItem", input);
assertTrue(output.isTensor());
Tensor value = output.toTensor();
assertArrayEquals(new long[] {}, value.shape());
assertArrayEquals(new long[] {someNumber}, value.getDataAsLongArray());
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does testEmptyShape() do?
testEmptyShape() is a function in the pytorch codebase.
What does testEmptyShape() call?
testEmptyShape() calls 1 function(s): loadModel.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free