mirror of https://github.com/explosion/spaCy.git
Set random seed in train script
This commit is contained in:
parent
20193371f5
commit
a2357cce3f
|
@ -11,6 +11,8 @@ import tqdm
|
||||||
from thinc.neural._classes.model import Model
|
from thinc.neural._classes.model import Model
|
||||||
from thinc.neural.optimizers import linear_decay
|
from thinc.neural.optimizers import linear_decay
|
||||||
from timeit import default_timer as timer
|
from timeit import default_timer as timer
|
||||||
|
import random
|
||||||
|
import numpy.random
|
||||||
|
|
||||||
from ..tokens.doc import Doc
|
from ..tokens.doc import Doc
|
||||||
from ..scorer import Scorer
|
from ..scorer import Scorer
|
||||||
|
@ -21,6 +23,9 @@ from .. import util
|
||||||
from .. import displacy
|
from .. import displacy
|
||||||
from ..compat import json_dumps
|
from ..compat import json_dumps
|
||||||
|
|
||||||
|
random.seed(0)
|
||||||
|
numpy.random.seed(0)
|
||||||
|
|
||||||
|
|
||||||
@plac.annotations(
|
@plac.annotations(
|
||||||
lang=("model language", "positional", None, str),
|
lang=("model language", "positional", None, str),
|
||||||
|
|
Loading…
Reference in New Issue