Skip to content

Commit

Permalink
adding more patches
Browse files Browse the repository at this point in the history
  • Loading branch information
mmikami123 committed Dec 7, 2024
1 parent 287aaa4 commit 40617af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion color_analysis/color_analysis_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def predict_image(model, image_path, class_labels, transform, device='cpu'):


def load_pretrained_model(model, save_path='color_analysis/trained_model.pth', device='cpu'):
"""Loads a previously trained model or starts from scratch if no model is found"""
"""Loads a previously trained model or creates the model from scratch if no model is found"""
if os.path.exists(save_path):
model.load_state_dict(torch.load(save_path, map_location=device, weights_only=True))
model.eval()
Expand Down

0 comments on commit 40617af

Please sign in to comment.