Skip to content

Support for Datasets with elements of different length #1084

@BrokenDuck

Description

@BrokenDuck

Currently, the skorch.dataset.get_len function does not accept dictionary input with elements of different size, raising ValueError("Dataset does not have consistent lengths.").

This behavior is problematic in cases such as GNNs with pytorch geometric, where the forward method expects node features and an edge index of a different size.

Accommodating for that could involve modifying the get_len function in some way to specify a length for a batch if a custom collate_fn is used.

I could implement that change in the library.

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