sketchgraphs_models.graph.model.numerical_features.NumericalFeaturesEmbedding

class sketchgraphs_models.graph.model.numerical_features.NumericalFeaturesEmbedding(embedding_dim)

Transform a sequence of numerical feature vectors into a single vector.

Currently, this module simply aggregates the features by averaging, although more elaborate aggregation schemes (e.g. RNN) could be chosen.

__init__(embedding_dim)

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(embeddings)

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.