Skip to content

Commit

Permalink
load_model should act in place and not return anything
Browse files Browse the repository at this point in the history
  • Loading branch information
bw4sz authored Oct 14, 2024
1 parent 99d0cfb commit 7e0aa43
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions deepforest/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def load_model(self, model_name="weecology/deepforest-tree", revision='main'):
revision (str): The model version ('main', 'v1.0.0', etc.).
Returns:
self (object):A trained PyTorch model with its config and weights.
None
"""
# Load the model using from_pretrained
self.create_model()
Expand All @@ -149,8 +149,6 @@ def load_model(self, model_name="weecology/deepforest-tree", revision='main'):
self.label_dict = {"Bird": 0}
self.numeric_to_label_dict = {v: k for k, v in self.label_dict.items()}

return self

def use_release(self, check_release=True):
"""Use the latest DeepForest model release from github and load model.
Optionally download if release doesn't exist.
Expand Down

0 comments on commit 7e0aa43

Please sign in to comment.