fusilli.fusionmodels.unimodal.imageο
Unimodal model using only the image data.
Classes
|
A uni-modal model using only the image data. |
- class ImgUnimodal(prediction_task, data_dims, multiclass_dimensions)[source]ο
Bases:
ParentFusionModel
,Module
A uni-modal model using only the image data.
- img_layersο
Dictionary containing the layers of the image data.
- Type:
nn.ModuleDict
- fused_dimο
Number of features of the fused layers. This is the flattened output size of the image layers.
- Type:
int
- fused_layersο
Sequential layer containing the fused layers.
- Type:
nn.Sequential
- final_predictionο
Sequential layer containing the final prediction layers.
- Type:
nn.Sequential
- __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.
- forward(x)[source]ο
Forward pass of the model.
- Parameters:
x (torch.Tensor) β Tensor containing the image data.
- Returns:
out_pred β List containing the predictions.
- Return type:
list
- fusion_type = 'unimodal'ο
Type of fusion.
- Type:
str
- method_name = 'Image unimodal'ο
Name of the method.
- Type:
str
- modality_type = 'img'ο
Type of modality.
- Type:
str