fusilli.fusionmodels.unimodal.tabular1ο
Tabular1 uni-modal model.
Classes
|
unimodal model for tabular data. |
- class Tabular1Unimodal(prediction_task, data_dims, multiclass_dimensions)[source]ο
Bases:
ParentFusionModel
,Module
unimodal model for tabular data.
This class implements a uni-modal model using only the 1st type of tabular data.
- mod1_layersο
Dictionary containing the layers of the 1st type of tabular data.
- Type:
nn.ModuleDict
- fused_layersο
Sequential layer containing the fused layers.
- Type:
nn.Sequential
- final_predictionο
Sequential layer containing the final prediction layers.
- Type:
nn.Sequential
- fused_dimο
Dimension of the fused layer.
- Type:
int
- __init__(prediction_task, data_dims, multiclass_dimensions)[source]ο
- Parameters:
prediction_task (str) β Type of prediction to be performed.
data_dims (list) β List containing the dimensions of the data.
multiclass_dimensions (int) β Number of classes in the multiclass classification task.
- calc_fused_layers()[source]ο
Calculate the fused layers.
If the mod1_layers are modified, this function will recalculate the fused layers.
- forward(x)[source]ο
Forward pass of the model.
- Parameters:
x (torch.Tensor) β Input tensor.
- Returns:
List containing the output of the model.
- Return type:
list
- fusion_type = 'unimodal'ο
Fusion type.
- Type:
str
- method_name = 'Tabular1 uni-modal'ο
Name of the method.
- Type:
str
- modality_type = 'tabular1'ο
Modality type.
- Type:
str