mirror of https://github.com/explosion/spaCy.git
81 lines
1.8 KiB
INI
81 lines
1.8 KiB
INI
|
# Training hyper-parameters and additional features.
|
||
|
[training]
|
||
|
# Whether to train on sequences with 'gold standard' sentence boundaries
|
||
|
# and tokens. If you set this to true, take care to ensure your run-time
|
||
|
# data is passed in sentence-by-sentence via some prior preprocessing.
|
||
|
gold_preproc = false
|
||
|
# Limitations on training document length or number of examples.
|
||
|
max_length = 5000
|
||
|
limit = 0
|
||
|
# Data augmentation
|
||
|
orth_variant_level = 0.0
|
||
|
dropout = 0.2
|
||
|
# Controls early-stopping. 0 or -1 mean unlimited.
|
||
|
patience = 1600
|
||
|
max_epochs = 0
|
||
|
max_steps = 20000
|
||
|
eval_frequency = 500
|
||
|
# Other settings
|
||
|
seed = 0
|
||
|
accumulate_gradient = 1
|
||
|
use_pytorch_for_gpu_memory = false
|
||
|
# Control how scores are printed and checkpoints are evaluated.
|
||
|
scores = ["speed", "ents_p", "ents_r", "ents_f"]
|
||
|
score_weights = {"ents_f": 1.0}
|
||
|
# These settings are invalid for the transformer models.
|
||
|
init_tok2vec = null
|
||
|
discard_oversize = false
|
||
|
omit_extra_lookups = false
|
||
|
|
||
|
[training.batch_size]
|
||
|
@schedules = "compounding.v1"
|
||
|
start = 100
|
||
|
stop = 1000
|
||
|
compound = 1.001
|
||
|
|
||
|
[training.optimizer]
|
||
|
@optimizers = "Adam.v1"
|
||
|
beta1 = 0.9
|
||
|
beta2 = 0.999
|
||
|
L2_is_weight_decay = false
|
||
|
L2 = 1e-6
|
||
|
grad_clip = 1.0
|
||
|
use_averages = true
|
||
|
eps = 1e-8
|
||
|
learn_rate = 0.001
|
||
|
|
||
|
#[optimizer.learn_rate]
|
||
|
#@schedules = "warmup_linear.v1"
|
||
|
#warmup_steps = 250
|
||
|
#total_steps = 20000
|
||
|
#initial_rate = 0.001
|
||
|
|
||
|
[nlp]
|
||
|
lang = "en"
|
||
|
vectors = null
|
||
|
|
||
|
[nlp.pipeline.ner]
|
||
|
factory = "ner"
|
||
|
learn_tokens = false
|
||
|
min_action_freq = 1
|
||
|
beam_width = 1
|
||
|
beam_update_prob = 1.0
|
||
|
|
||
|
[nlp.pipeline.ner.model]
|
||
|
@architectures = "spacy.TransitionBasedParser.v1"
|
||
|
nr_feature_tokens = 3
|
||
|
hidden_width = 64
|
||
|
maxout_pieces = 2
|
||
|
use_upper = true
|
||
|
|
||
|
[nlp.pipeline.ner.model.tok2vec]
|
||
|
@architectures = "spacy.HashEmbedCNN.v1"
|
||
|
pretrained_vectors = ${nlp:vectors}
|
||
|
width = 96
|
||
|
depth = 4
|
||
|
window_size = 1
|
||
|
embed_size = 2000
|
||
|
maxout_pieces = 3
|
||
|
subword_features = true
|
||
|
dropout = ${training:dropout}
|