Shortcuts

Source code for torchgeo.datamodules.usavars

# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

"""USAVars datamodule."""

from typing import Any

from ..datasets import USAVars
from .geo import NonGeoDataModule


[docs]class USAVarsDataModule(NonGeoDataModule): """LightningDataModule implementation for the USAVars dataset. Uses random train/val/test splits. .. versionadded:: 0.3 """
[docs] def __init__( self, batch_size: int = 64, num_workers: int = 0, **kwargs: Any ) -> None: """Initialize a new USAVarsDataModule instance. Args: batch_size: Size of each mini-batch. num_workers: Number of workers for parallel data loading. **kwargs: Additional keyword arguments passed to :class:`~torchgeo.datasets.USAVars`. """ super().__init__(USAVars, batch_size, num_workers, **kwargs)

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources