Home / Function/ assetFilePath() — pytorch Function Reference

assetFilePath() — pytorch Function Reference

Architecture documentation for the assetFilePath() function in PytorchHostTests.java from the pytorch codebase.

Entity Profile

Dependency Diagram

graph TD
  1cf2ee5c_8fe6_f4cb_fd05_a1b268ab74a8["assetFilePath()"]
  35365166_3d33_b2e0_d7b7_d0f31b171970["loadModel()"]
  35365166_3d33_b2e0_d7b7_d0f31b171970 -->|calls| 1cf2ee5c_8fe6_f4cb_fd05_a1b268ab74a8
  style 1cf2ee5c_8fe6_f4cb_fd05_a1b268ab74a8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

android/pytorch_android/src/androidTest/java/org/pytorch/PytorchHostTests.java lines 17–24

  private String assetFilePath(String assetName) throws IOException {
    Path tempFile = Files.createTempFile("test", ".pt");
    try (InputStream resource =
        Objects.requireNonNull(getClass().getClassLoader().getResourceAsStream("test.pt"))) {
      Files.copy(resource, tempFile, StandardCopyOption.REPLACE_EXISTING);
    }
    return tempFile.toAbsolutePath().toString();
  }

Subdomains

Called By

Frequently Asked Questions

What does assetFilePath() do?
assetFilePath() is a function in the pytorch codebase.
What calls assetFilePath()?
assetFilePath() is called by 1 function(s): loadModel.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free