SenticGCNConfig

class SenticGCNConfig(embed_dim: int = 300, hidden_dim: int = 300, polarities_dim: int = 3, dropout: float = 0.3, loss_function: str = 'cross_entropy', **kwargs)[source]

This is the configuration class to store the configuration of a SenticGCNModel. It is used to instantiate a SenticGCNModel network according to the specific arguments, defining the model architecture.

Parameters
  • embed_dim (int, defaults to 300) – Embedding dimension size.

  • hidden_dim (int, defaults to 300) – Size of hidden dimension.

  • dropout (float, defaults to 0.3) – Droput percentage.

  • polarities_dim (int, defaults to 3) – Size of output dimension representing available polarities (e.g. Positive, Negative, Neutral).

  • loss_function (str, defaults to ‘cross_entropy’) – Loss function for training/eval.

Example

from sgnlp.models.sentic_gcn import SenticGCNConfig

# Initialize with default values config = SenticGCNConfig()