waseoke commited on
Commit
2642269
·
verified ·
1 Parent(s): 067bb59

Update calculate_cosine_similarity.py

Browse files
Files changed (1) hide show
  1. calculate_cosine_similarity.py +1 -1
calculate_cosine_similarity.py CHANGED
@@ -48,7 +48,7 @@ def load_trained_model(model_path="product_model.pth"):
48
  torch.nn.ReLU(),
49
  torch.nn.Linear(256, 128),
50
  )
51
- model.load_state_dict(torch.load(model_path))
52
  model.eval() # 평가 모드
53
  return model
54
 
 
48
  torch.nn.ReLU(),
49
  torch.nn.Linear(256, 128),
50
  )
51
+ model.load_state_dict(torch.load(model_path, weights_only=True))
52
  model.eval() # 평가 모드
53
  return model
54