mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-11 04:08:09 +03:00
formatting
This commit is contained in:
parent
776d4f1190
commit
3ade455fd3
|
@ -26,8 +26,7 @@ from ..gold import Example
|
||||||
use_gpu=("Use GPU", "option", "g", int),
|
use_gpu=("Use GPU", "option", "g", int),
|
||||||
resume_path=("Path to pretrained weights from which to resume pretraining", "option","r", Path),
|
resume_path=("Path to pretrained weights from which to resume pretraining", "option","r", Path),
|
||||||
epoch_resume=("The epoch to resume counting from when using '--resume_path'. Prevents unintended overwriting of existing weight files.","option", "er", int),
|
epoch_resume=("The epoch to resume counting from when using '--resume_path'. Prevents unintended overwriting of existing weight files.","option", "er", int),
|
||||||
|
# fmt: on
|
||||||
# fmt: on
|
|
||||||
)
|
)
|
||||||
def pretrain(
|
def pretrain(
|
||||||
texts_loc,
|
texts_loc,
|
||||||
|
@ -183,7 +182,9 @@ def pretrain(
|
||||||
msg.row(progress, **row_settings)
|
msg.row(progress, **row_settings)
|
||||||
if texts_loc == "-" and tracker.words_per_epoch[epoch] >= 10 ** 7:
|
if texts_loc == "-" and tracker.words_per_epoch[epoch] >= 10 ** 7:
|
||||||
break
|
break
|
||||||
if pretrain_config["n_save_every"] and (batch_id % pretrain_config["n_save_every"] == 0):
|
if pretrain_config["n_save_every"] and (
|
||||||
|
batch_id % pretrain_config["n_save_every"] == 0
|
||||||
|
):
|
||||||
_save_model(epoch, is_temp=True)
|
_save_model(epoch, is_temp=True)
|
||||||
_save_model(epoch)
|
_save_model(epoch)
|
||||||
tracker.epoch_loss = 0.0
|
tracker.epoch_loss = 0.0
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
from .models import *
|
from .models import *
|
||||||
|
|
|
@ -10,4 +10,4 @@ embed_size = 300
|
||||||
window_size = 1
|
window_size = 1
|
||||||
maxout_pieces = 3
|
maxout_pieces = 3
|
||||||
subword_features = true
|
subword_features = true
|
||||||
dropout = null
|
dropout = null
|
||||||
|
|
|
@ -11,4 +11,4 @@ window_size = 1
|
||||||
maxout_pieces = 3
|
maxout_pieces = 3
|
||||||
nM = 64
|
nM = 64
|
||||||
nC = 8
|
nC = 8
|
||||||
dropout = null
|
dropout = null
|
||||||
|
|
|
@ -7,4 +7,4 @@ conv_depth = 2
|
||||||
embed_size = 2000
|
embed_size = 2000
|
||||||
window_size = 1
|
window_size = 1
|
||||||
ngram_size = 1
|
ngram_size = 1
|
||||||
dropout = null
|
dropout = null
|
||||||
|
|
|
@ -7,4 +7,4 @@ embed_size = 2000
|
||||||
window_size = 1
|
window_size = 1
|
||||||
maxout_pieces = 3
|
maxout_pieces = 3
|
||||||
subword_features = true
|
subword_features = true
|
||||||
dropout = null
|
dropout = null
|
||||||
|
|
Loading…
Reference in New Issue
Block a user