Skip to content

Multiple concatenation with logical or operator yields nested concatenation #25

Description

@w-m

Concatenation of two datasets with the logical operator works as intended:
concat_2 = images | images

While concatenation of more datasets (concat_3 = images | images | images) yields a nested concatenated dataset.

The code is equivalent to:
concat_3 = torchdata.datasets.ConcatDataset([torchdata.datasets.ConcatDataset([images, images]), images])

I'd argue a more intuitive result would something that is equivalent to this instead:
concat_3 = torchdata.datasets.ConcatDataset([images, images, images])

In short, concatenating with the | operator to an already concatenated dataset should add the new dataset in the list of concatenations, instead of creating a nested concatenated dataset.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions