Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/data/pytorch_neo/code/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ def model_fn(model_dir):
logger.info("model_fn")
neopytorch.config(model_dir=model_dir, neo_runtime=True)
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
# The compiled model is saved as "compiled.pt"
model = torch.jit.load(os.path.join(model_dir, "compiled.pt"), map_location=device)
# The compiled model is saved as "model.pth"
model = torch.jit.load(os.path.join(model_dir, "model.pth"), map_location=device)

# It is recommended to run warm-up inference during model load
sample_input_path = os.path.join(model_dir, "sample_input.pkl")
Expand Down