Skip to content

Commit

Permalink
chore: change name of ann scripted model
Browse files Browse the repository at this point in the history
  • Loading branch information
TomMelt committed Feb 5, 2025
1 parent 4f8f619 commit 67cad7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion era5_training/infer.f90
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ program infer
call torch_tensor_from_array(output_tensor(1), prediction_2d, layout_2d, torch_kCPU)

! Load ML model
call torch_model_load(model, trim(script_model_path) // "/nlgw_ann_gpu_scripted.pt", device_type=torch_kCUDA, device_index=0)
call torch_model_load(model, trim(script_model_path) // "/nlgw_ann-cnn_gpu_scripted.pt", device_type=torch_kCUDA, device_index=0)

! Infer
do i = 1, num_loops
Expand Down
2 changes: 1 addition & 1 deletion utils/function_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def Inference_and_Save_ANN_CNN(model, testset, testloader, bs_test, device, sten
# dummy_inputs = torch.tensor(np.ones(INP.shape, dtype=np.float32)).to(device)
# trace_to_torchscript(model, dummy_input=dummy_inputs, filename="nlgw_ann_gpu_traced.pt")
print("scripting...")
script_to_torchscript(model, filename="nlgw_ann_gpu_scripted.pt")
script_to_torchscript(model, filename="nlgw_ann-cnn_gpu_scripted.pt")
print("complete")

S = PRED.shape
Expand Down

0 comments on commit 67cad7c

Please sign in to comment.