Skip to content

Check passing initialized modules #106

@kulbachcedric

Description

@kulbachcedric

This issue proposes changes to enhance flexibility in handling PyTorch modules by allowing initialized modules to be passed to the base classes. This could help streamline workflows where pre-initialized or pre-trained models are frequently used.

Current Implementation

The current Regressor and similar classes require a module type (Type[torch.nn.Module]) to instantiate a model internally. This design works well for simple use cases but restricts flexibility when users need to use pre-initialized modules.

Discussion Points

  1. Impact on Existing Workflows:
    Will allowing initialized modules complicate initialization for existing users?

  2. Documentation Updates:
    How should we structure documentation to highlight this change?

However, with this change we would diverge from skorch.

Best
Cedric

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions