Skip to content

Commit

Permalink
Merge branch 'master' into Ghostvv-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghostvv committed Mar 11, 2020
2 parents bf92237 + 35b8ed5 commit 52b332c
Show file tree
Hide file tree
Showing 4 changed files with 441 additions and 77 deletions.
8 changes: 5 additions & 3 deletions rasa/core/policies/ted_policy.py
Expand Up @@ -106,7 +106,7 @@ class TEDPolicy(Policy):
NUM_HEADS: 4,
# If 'True' use key relative embeddings in attention
KEY_RELATIVE_ATTENTION: False,
# If 'True' use key relative embeddings in attention
# If 'True' use value relative embeddings in attention
VALUE_RELATIVE_ATTENTION: False,
# Max position for relative embeddings
MAX_RELATIVE_POSITION: None,
Expand Down Expand Up @@ -144,13 +144,15 @@ class TEDPolicy(Policy):
# If 'True' the algorithm only minimizes maximum similarity over
# incorrect intent labels, used only if 'loss_type' is set to 'margin'.
USE_MAX_NEG_SIM: True,
# Scale loss inverse proportionally to confidence of correct prediction
# If 'True' scale loss inverse proportionally to the confidence
# of the correct prediction
SCALE_LOSS: True,
# ## Regularization parameters
# The scale of regularization
REGULARIZATION_CONSTANT: 0.001,
# The scale of how important is to minimize the maximum similarity
# between embeddings of different labels.
# between embeddings of different labels,
# used only if 'loss_type' is set to 'margin'.
NEGATIVE_MARGIN_SCALE: 0.8,
# Dropout rate for embedding layers of dialogue features.
DROP_RATE_DIALOGUE: 0.1,
Expand Down
8 changes: 5 additions & 3 deletions rasa/nlu/classifiers/diet_classifier.py
Expand Up @@ -125,7 +125,7 @@ def required_components(cls) -> List[Type[Component]]:
NUM_HEADS: 4,
# If 'True' use key relative embeddings in attention
KEY_RELATIVE_ATTENTION: False,
# If 'True' use key relative embeddings in attention
# If 'True' use value relative embeddings in attention
VALUE_RELATIVE_ATTENTION: False,
# Max position for relative embeddings
MAX_RELATIVE_POSITION: None,
Expand Down Expand Up @@ -169,13 +169,15 @@ def required_components(cls) -> List[Type[Component]]:
# If 'True' the algorithm only minimizes maximum similarity over
# incorrect intent labels, used only if 'loss_type' is set to 'margin'.
USE_MAX_NEG_SIM: True,
# Scale loss inverse proportionally to confidence of correct prediction
# If 'True' scale loss inverse proportionally to the confidence
# of the correct prediction
SCALE_LOSS: True,
# ## Regularization parameters
# The scale of regularization
REGULARIZATION_CONSTANT: 0.002,
# The scale of how important is to minimize the maximum similarity
# between embeddings of different labels.
# between embeddings of different labels,
# used only if 'loss_type' is set to 'margin'.
NEGATIVE_MARGIN_SCALE: 0.8,
# Dropout rate for encoder
DROP_RATE: 0.2,
Expand Down

0 comments on commit 52b332c

Please sign in to comment.