From ba51529a32e8e9458bcd40cdeebbdc6d91344b51 Mon Sep 17 00:00:00 2001 From: bw4sz Date: Sun, 5 Jan 2025 07:01:57 -0800 Subject: [PATCH] docstring got corrupted --- src/deepforest/main.py | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/deepforest/main.py b/src/deepforest/main.py index 26a76742..3adc201f 100644 --- a/src/deepforest/main.py +++ b/src/deepforest/main.py @@ -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, @@ -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.