georgian-io/Multimodal-Toolkit

Typo in example Forward Pass of Transformer With Tabular Models)

maxlchen opened this issue · 0 comments

I believe there is a typo under docs/source/notes/introduction.rst on line 98.

model_inputs['num_feats'] = numerical_feat

should be

model_inputs['numerical_feats'] = numerical_feat

if we are not explicitly specifying the features in the forward pass. The forward pass defined for the Tabular models takes a numerical_feats parameter, not num_feats. So in the example given, it would compute the forward pass with None for the numeric features.

Longer snippet from introduction.rst below:

model_inputs['cat_feats'] = categorical_feat
model_inputs['num_feats'] = numerical_feat
model_inputs['labels'] = labels

loss, logits, layer_outs = model(**model_inputs)