universal_attention/data.py
def load_segmentation_dataset(batch_size: int) -> DatasetAndInfo:
    """
    Load the dataset used for zero-shot segmentation.

    Parameters
    ----------
    batch_size: int
        Batch size to load the dataset with.

    Returns
    -------
    dataset, info: DatasetAndInfo
        The segmentation dataset and its information.
    """
    splits, info = _load_dataset(SEGMENTATION_DATASET, batch_size)
    splits_processed = {
        key: ds.map(
            _resize_segmentation,
            num_parallel_calls=tf.data.experimental.AUTOTUNE,
        )
        .batch(batch_size)
        .map(
            _standardize_input, num_parallel_calls=tf.data.experimental.AUTOTUNE
        )
        for key, ds in splits.items()
    }

    return splits_processed, info

    Load the dataset used for zero-shot segmentation.

    Parameters
    ----------
    batch_size: int
        Batch size to load the dataset with.

    Returns
    -------
    dataset, info: DatasetAndInfo
        The segmentation dataset and its information.
    
Load the dataset used for zero-shot segmentation.
Parameters

int
Batch size to load the dataset with.

Returns

dataset, info: DatasetAndInfo
The segmentation dataset and its information.
Load the dataset used for zero - shot segmentation . Parameters int Batch size to load the dataset with . Returns dataset info : DatasetAndInfo The segmentation dataset and its information .
def load_segmentation_dataset(batch_size: int) -> DatasetAndInfo:
    splits, info = _load_dataset(SEGMENTATION_DATASET, batch_size)
    splits_processed = {
        key: ds.map(
            _resize_segmentation,
            num_parallel_calls=tf.data.experimental.AUTOTUNE,
        )
        .batch(batch_size)
        .map(
            _standardize_input, num_parallel_calls=tf.data.experimental.AUTOTUNE
        )
        for key, ds in splits.items()
    }
    return splits_processed, info
def load_segmentation_dataset ( batch_size : int ) -> DatasetAndInfo : splits , info = _load_dataset ( SEGMENTATION_DATASET , batch_size ) splits_processed = { key : ds . map ( _resize_segmentation , num_parallel_calls = tf . data . experimental . AUTOTUNE , ) . batch ( batch_size ) . map ( _standardize_input , num_parallel_calls = tf . data . experimental . AUTOTUNE ) for key , ds in splits . items ( ) } return splits_processed , info
Load the dataset used for zero-shot segmentation.
Load the dataset used for zero - shot segmentation .
"""
    Load the dataset used for zero-shot segmentation.

    Parameters
    ----------
    batch_size: int
        Batch size to load the dataset with.

    Returns
    -------
    dataset, info: DatasetAndInfo
        The segmentation dataset and its information.
    """
batch_size
int