mlcolvar.core.transform.Transform¶
- class mlcolvar.core.transform.Transform(in_features: int, out_features: int)[source]¶
Bases:
ModuleBase transform class. To implement a new transform override the forward method. The parameters of the transform should be set either in the initialization or via the setup_from_datamodule function.
- __init__(in_features: int, out_features: int)[source]¶
Transform class options.
- Parameters:
in_features (int) – Number of inputs of the transform
out_features (int) – Number of outputs of the transform
Methods
__init__(in_features, out_features)Transform class options.
forward(X)Define the computation performed at every call.
setup_from_datamodule(datamodule)Initialize parameters based on pytorch lighting datamodule.
teardown()- forward(X: Tensor)[source]¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
Attributes
T_destination
call_super_init
dump_patches
training