moabb.pipelines.utils_pytorch.InputShapeSetterEEG#
- moabb.pipelines.utils_pytorch.InputShapeSetterEEG(params_list=None, input_dim_fn=<function get_shape_from_baseconcat>, module_name='module')[source]#
Sets the input dimension of the PyTorch module to the input dimension of the training data. This can be of use when the shape of X is not known beforehand, e.g. when using a skorch model within an sklearn pipeline and grid-searching feature transformers, or using feature selection methods.InputShapeSetterEEG Basic usage:
- Parameters
params_list (list) – The list of parameters that define the input dimension in its
__init__
method. Usually the mandatory parameters from the model.input_dim_fn (callable, None (default=None)) – In case your
X
value is more complex and deriving the input dimension is not as easy asX.shape[-1]
you can pass a callable to this parameter which takesX
and returns the input dimension.module_name (str (default='module')) – Only needs change when you are using more than one module in your skorch model (e.g., in case of GANs).