Home / Function/ testEqDictIntKeyIntValue() — pytorch Function Reference

testEqDictIntKeyIntValue() — pytorch Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  42124eff_d701_6daa_d428_81621d61a08a["testEqDictIntKeyIntValue()"]
  fd3711c0_c2a1_0848_309d_ba2ef1be4466["loadModel()"]
  42124eff_d701_6daa_d428_81621d61a08a -->|calls| fd3711c0_c2a1_0848_309d_ba2ef1be4466
  style 42124eff_d701_6daa_d428_81621d61a08a 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());
    }
  }

Subdomains

Calls

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