fusilli.fusionmodels.unimodal.tabular1

Tabular1 uni-modal model.

Classes

Tabular1Unimodal(prediction_task,Β data_dims,Β ...)

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

get_fused_dim()[source]

Get the number of features of the fused layers.

Return type:

None

method_name = 'Tabular1 uni-modal'

Name of the method.

Type:

str

modality_type = 'tabular1'

Modality type.

Type:

str