RstPointerParserConfig¶
-
class
RstPointerParserConfig
(word_dim=1024, hidden_size=64, decoder_input_size=64, atten_model='Dotproduct', classifier_input_size=64, classifier_hidden_size=64, highorder=False, classes_label=39, classifier_bias=True, rnn_layers=6, dropout_e=0.33, dropout_d=0.5, dropout_c=0.5, elmo_size='Large', **kwargs)[source]¶ This is the configuration class to store the configuration of a
RstPointerParserModel
. It is used to instantiate a discourse parser pointer network according to the specified arguments, defining the model architecture.Configuration objects inherit from
PretrainedConfig
and can be used to control the model outputs. Read the documentation fromPretrainedConfig
for more information.- Parameters
word_dim (
int
, defaults to 1024) – Word dimension size.hidden_size (
int
, defaults to 64) – Hidden dimension size.decoder_input_size (
int
, defaults to 64) – Decoder input size.atten_model – (
str
, defaults to “Dotproduct”): Attention type. Supported choices: [“Dotproduct”, “Biaffine”].classifier_input_size (
int
, defaults to 64) – Classifier input size.classifier_hidden_size (
int
, defaults to 64) – Classifier hidden size.highorder (
bool
, defaults to False) – Whether to incorporate higher order information.classes_label (
int
, defaults to 39) – Number of classes to predict for.classifier_bias (
bool
, defaults to True) – Whether to use bias for classifier.rnn_layers (
int
, defaults to 6) – Number of RNN layers.dropout_e (
float
, defaults to 0.33) – Dropout rate for encoder layer.dropout_d (
float
, defaults to 0.5) – Dropout rate for decoder layer.dropout_c (
float
, defaults to 0.5) – Dropout rate for classifier layer.elmo_size (
bool
, defaults to “Large”) – Elmo size. Supported choices: [“Large”, “Medium”, “Small”].
Example:
from sgnlp.models.rst_pointer import RstPointerParserConfig # Initialize with default values config = RstPointerParserConfig()