testEqFloat() — pytorch Function Reference
Architecture documentation for the testEqFloat() function in PytorchTestBase.java from the pytorch codebase.
Entity Profile
Dependency Diagram
graph TD c451d41e_f464_e4b1_265d_7f5297fbc41a["testEqFloat()"] fd3711c0_c2a1_0848_309d_ba2ef1be4466["loadModel()"] c451d41e_f464_e4b1_265d_7f5297fbc41a -->|calls| fd3711c0_c2a1_0848_309d_ba2ef1be4466 style c451d41e_f464_e4b1_265d_7f5297fbc41a 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
Source
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