Skip to content

Commit

Permalink
docstring got corrupted
Browse files Browse the repository at this point in the history
  • Loading branch information
bw4sz committed Jan 5, 2025
1 parent fcf04f4 commit ba51529
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions src/deepforest/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,20 @@


class deepforest(pl.LightningModule, PyTorchModelHubMixin):
"""Class for training and predicting tree crowns in RGB images."""
"""Class for training and predicting tree crowns in RGB images.
Args:
num_classes (int): number of classes in the model
config_file (str): path to deepforest config file
model (model.Model()): a deepforest model object, see model.Model().
config_args (dict): a dictionary of key->value to update
config file at run time. e.g. {"batch_size":10}
This is useful for iterating over arguments during model testing.
existing_train_dataloader: a Pytorch dataloader that yields a tuple path, images, targets
existing_val_dataloader: a Pytorch dataloader that yields a tuple path, images, targets
Returns:
self: a deepforest pytorch lightning module
"""

def __init__(self,
num_classes: int = 1,
Expand All @@ -34,18 +47,7 @@ def __init__(self,
model=None,
existing_train_dataloader=None,
existing_val_dataloader=None):
"""Args:
num_classes (int): number of classes in the model
config_file (str): path to deepforest config file
model (model.Model()): a deepforest model object, see model.Model().
config_args (dict): a dictionary of key->value to update
config file at run time. e.g. {"batch_size":10}
This is useful for iterating over arguments during model testing.
existing_train_dataloader: a Pytorch dataloader that yields a tuple path, images, targets
existing_val_dataloader: a Pytorch dataloader that yields a tuple path, images, targets
Returns:
self: a deepforest pytorch lightning module
"""

super().__init__()

# Read config file. Defaults to deepforest_config.yml in working directory.
Expand Down

0 comments on commit ba51529

Please sign in to comment.