Home / Function/ testEqFloat() — pytorch Function Reference

testEqFloat() — pytorch Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  ca764449_5f60_2b7d_161d_cdd17b85c8fe["testEqFloat()"]
  9f728842_eeeb_dcbf_a87a_1decf4b380f8["loadModel()"]
  ca764449_5f60_2b7d_161d_cdd17b85c8fe -->|calls| 9f728842_eeeb_dcbf_a87a_1decf4b380f8
  style ca764449_5f60_2b7d_161d_cdd17b85c8fe fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

android/pytorch_android/src/androidTest/java/org/pytorch/PytorchTestBase.java lines 53–78

  @Test
  public void testEqFloat() throws IOException {
    final Module module = loadModel(TEST_MODULE_ASSET_NAME);
    double[] values =
        new double[] {
          -Double.MAX_VALUE,
          Double.MAX_VALUE,
          -Double.MIN_VALUE,
          Double.MIN_VALUE,
          -Math.exp(1.d),
          -Math.sqrt(2.d),
          -3.1415f,
          3.1415f,
          -1,
          0,
          1,
        };
    for (double value : values) {
      final IValue input = IValue.from(value);
      assertTrue(input.isDouble());
      assertTrue(value == input.toDouble());
      final IValue output = module.runMethod("eqFloat", input);
      assertTrue(output.isDouble());
      assertTrue(value == output.toDouble());
    }
  }

Domain

Subdomains

Calls

Frequently Asked Questions

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