Skip to content

Commit

Permalink
update docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
isaaccorley committed Apr 25, 2023
1 parent 8b0c8d8 commit be4cd0d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
7 changes: 2 additions & 5 deletions torchgeo/trainers/classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,7 @@ class ClassificationTask(LightningModule): # type: ignore[misc]
"""

def config_model(self) -> None:
"""Configures the model based on kwargs parameters passed to the constructor.
.. versionchanged:: 0.5
Added *freeze_backbone* parameter.
"""
"""Configures the model based on kwargs parameters passed to the constructor."""
# Create model
weights = self.hyperparams["weights"]
self.model = timm.create_model(
Expand Down Expand Up @@ -105,6 +101,7 @@ def __init__(self, **kwargs: Any) -> None:
.. versionchanged:: 0.4
The *classification_model* parameter was renamed to *model*.
.. versionchanged:: 0.5
Added *freeze_backbone* parameter.
"""
Expand Down
7 changes: 2 additions & 5 deletions torchgeo/trainers/regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,7 @@ class RegressionTask(LightningModule): # type: ignore[misc]
target_key: str = "label"

def config_model(self) -> None:
"""Configures the model based on kwargs parameters.
.. versionchanged:: 0.5
Added *freeze_backbone* parameter.
"""
"""Configures the model based on kwargs parameters."""
# Create model
weights = self.hyperparams["weights"]
self.model = timm.create_model(
Expand Down Expand Up @@ -101,6 +97,7 @@ def __init__(self, **kwargs: Any) -> None:
.. versionchanged:: 0.4
Change regression model support from torchvision.models to timm
.. versionchanged:: 0.5
Added *freeze_backbone* parameter.
"""
Expand Down

0 comments on commit be4cd0d

Please sign in to comment.