Home / Function/ testEqDictStrKeyIntValue() — pytorch Function Reference

testEqDictStrKeyIntValue() — pytorch Function Reference

Architecture documentation for the testEqDictStrKeyIntValue() function in PytorchTestBase.java from the pytorch codebase.

Entity Profile

Dependency Diagram

graph TD
  68fe8e5d_795e_17f3_53d5_72161fc6b108["testEqDictStrKeyIntValue()"]
  fd3711c0_c2a1_0848_309d_ba2ef1be4466["loadModel()"]
  68fe8e5d_795e_17f3_53d5_72161fc6b108 -->|calls| fd3711c0_c2a1_0848_309d_ba2ef1be4466
  style 68fe8e5d_795e_17f3_53d5_72161fc6b108 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

android/pytorch_android/src/androidTest/java/org/pytorch/PytorchTestBase.java lines 129–151

  @Test
  public void testEqDictStrKeyIntValue() throws IOException {
    final Module module = loadModel(TEST_MODULE_ASSET_NAME);
    final Map<String, 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("long_0", IValue.from(0l));
    inputMap.put("long_1", IValue.from(1l));
    inputMap.put("long_-1", IValue.from(-1l));

    final IValue input = IValue.dictStringKeyFrom(inputMap);
    assertTrue(input.isDictStringKey());

    final IValue output = module.runMethod("eqDictStrKeyIntValue", input);
    assertTrue(output.isDictStringKey());

    final Map<String, IValue> outputMap = output.toDictStringKey();
    assertTrue(inputMap.size() == outputMap.size());
    for (Map.Entry<String, IValue> entry : inputMap.entrySet()) {
      assertTrue(outputMap.get(entry.getKey()).toLong() == entry.getValue().toLong());
    }
  }

Subdomains

Calls

Frequently Asked Questions

What does testEqDictStrKeyIntValue() do?
testEqDictStrKeyIntValue() is a function in the pytorch codebase.
What does testEqDictStrKeyIntValue() call?
testEqDictStrKeyIntValue() 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