Skip to content

Commit fc71ed7

Browse files
committed
change crf extractor defaults
1 parent 65ad5d9 commit fc71ed7

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

rasa/nlu/extractors/crf_entity_extractor.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
DROPRATE,
3131
REGULARIZATION_CONSTANT,
3232
BILOU_FLAG,
33-
SHARE_HIDDEN_LAYERS,
34-
UNIDIRECTIONAL_ENCODER,
3533
)
3634
from rasa.utils.common import raise_warning
3735
from rasa.utils.tensorflow.models import RasaModel
@@ -72,13 +70,13 @@ class CRFEntityExtractor(DIETClassifier):
7270
# nn architecture
7371
# sizes of hidden layers before the embedding layer for input words
7472
# the number of hidden layers is thus equal to the length of this list
75-
HIDDEN_LAYERS_SIZES: {TEXT: [256, 128]},
73+
HIDDEN_LAYERS_SIZES: {TEXT: []},
7674
# training parameters
7775
# initial and final batch sizes - batch size will be
7876
# linearly increased for each epoch
7977
BATCH_SIZES: [64, 256],
8078
# how to create batches
81-
BATCH_STRATEGY: "balanced", # string 'sequence' or 'balanced'
79+
BATCH_STRATEGY: "sequence", # string 'sequence' or 'balanced'
8280
# number of epochs
8381
EPOCHS: 300,
8482
# set random seed to any int to get reproducible results
@@ -103,7 +101,7 @@ class CRFEntityExtractor(DIETClassifier):
103101
# BILOU_flag determines whether to use BILOU tagging or not.
104102
# More rigorous however requires more examples per entity
105103
# rule of thumb: use only if more than 100 egs. per entity
106-
BILOU_FLAG: False,
104+
BILOU_FLAG: True,
107105
}
108106
# end default properties (DOC MARKER - don't remove)
109107

0 commit comments

Comments
 (0)