Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README: update Lightning trainer examples #1211

Merged
merged 1 commit into from
Apr 3, 2023
Merged

README: update Lightning trainer examples #1211

merged 1 commit into from
Apr 3, 2023

Conversation

adamjstewart
Copy link
Collaborator

Noticed some things that were out of date.

@adamjstewart adamjstewart added this to the 0.4.1 milestone Mar 30, 2023
landsat7 = Landsat7(root="...")
landsat8 = Landsat8(root="...", bands=Landsat8.all_bands[1:-2])
landsat7 = Landsat7(root="...", bands=["B1", ..., "B7"])
landsat8 = Landsat8(root="...", bands=["B2", ..., "B8"])
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is more clear how it works

@@ -124,8 +125,18 @@ In order to facilitate direct comparisons between results published in the liter

```python
datamodule = InriaAerialImageLabelingDataModule(root="...", batch_size=64, num_workers=6)
task = SemanticSegmentationTask(segmentation_model="unet", encoder_weights="imagenet", learning_rate=0.1)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parameter names changed. At the moment, every single argument is required, although I'm planning on changing this in the future.

@@ -124,8 +125,18 @@ In order to facilitate direct comparisons between results published in the liter

```python
datamodule = InriaAerialImageLabelingDataModule(root="...", batch_size=64, num_workers=6)
task = SemanticSegmentationTask(segmentation_model="unet", encoder_weights="imagenet", learning_rate=0.1)
trainer = Trainer(gpus=1, default_root_dir="...")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gpus=1 is replaced by accelerator="gpu", devices=1, but the correct device is now chosen automatically by default.

@adamjstewart adamjstewart merged commit 8c98167 into main Apr 3, 2023
@adamjstewart adamjstewart deleted the docs/readme branch April 3, 2023 18:44
yichiac pushed a commit to yichiac/torchgeo that referenced this pull request Apr 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants