testEqDictIntKeyIntValue() — pytorch Function Reference
Architecture documentation for the testEqDictIntKeyIntValue() function in PytorchTestBase.java from the pytorch codebase.
Entity Profile
Dependency Diagram
graph TD 41340266_4f4d_450c_b376_860a2ea2a130["testEqDictIntKeyIntValue()"] 9f728842_eeeb_dcbf_a87a_1decf4b380f8["loadModel()"] 41340266_4f4d_450c_b376_860a2ea2a130 -->|calls| 9f728842_eeeb_dcbf_a87a_1decf4b380f8 style 41340266_4f4d_450c_b376_860a2ea2a130 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
android/pytorch_android/src/androidTest/java/org/pytorch/PytorchTestBase.java lines 105–127
@Test
public void testEqDictIntKeyIntValue() throws IOException {
final Module module = loadModel(TEST_MODULE_ASSET_NAME);
final Map<Long, IValue> inputMap = new HashMap<>();
inputMap.put(Long.MIN_VALUE, IValue.from(-Long.MIN_VALUE));
inputMap.put(Long.MAX_VALUE, IValue.from(-Long.MAX_VALUE));
inputMap.put(0l, IValue.from(0l));
inputMap.put(1l, IValue.from(-1l));
inputMap.put(-1l, IValue.from(1l));
final IValue input = IValue.dictLongKeyFrom(inputMap);
assertTrue(input.isDictLongKey());
final IValue output = module.runMethod("eqDictIntKeyIntValue", input);
assertTrue(output.isDictLongKey());
final Map<Long, IValue> outputMap = output.toDictLongKey();
assertTrue(inputMap.size() == outputMap.size());
for (Map.Entry<Long, IValue> entry : inputMap.entrySet()) {
assertTrue(outputMap.get(entry.getKey()).toLong() == entry.getValue().toLong());
}
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does testEqDictIntKeyIntValue() do?
testEqDictIntKeyIntValue() is a function in the pytorch codebase.
What does testEqDictIntKeyIntValue() call?
testEqDictIntKeyIntValue() 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