mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-06 21:03:07 +03:00
Make depth setting in parser work again
This commit is contained in:
parent
bfabc333be
commit
943af4423a
|
@ -277,6 +277,7 @@ cdef class Parser:
|
||||||
upper = chain(
|
upper = chain(
|
||||||
HistoryFeatures(nr_class=nr_class, hist_size=HIST_SIZE, nr_dim=HIST_DIMS),
|
HistoryFeatures(nr_class=nr_class, hist_size=HIST_SIZE, nr_dim=HIST_DIMS),
|
||||||
Maxout(hidden_width, hidden_width+HIST_SIZE*HIST_DIMS),
|
Maxout(hidden_width, hidden_width+HIST_SIZE*HIST_DIMS),
|
||||||
|
clone(Maxout(hidden_width, hidden_width), depth-2),
|
||||||
zero_init(Affine(nr_class, hidden_width, drop_factor=0.0))
|
zero_init(Affine(nr_class, hidden_width, drop_factor=0.0))
|
||||||
)
|
)
|
||||||
upper.is_noop = False
|
upper.is_noop = False
|
||||||
|
@ -286,7 +287,7 @@ cdef class Parser:
|
||||||
zero_init(Affine(nr_class, hidden_width, drop_factor=0.0))
|
zero_init(Affine(nr_class, hidden_width, drop_factor=0.0))
|
||||||
)
|
)
|
||||||
upper.is_noop = False
|
upper.is_noop = False
|
||||||
|
|
||||||
# TODO: This is an unfortunate hack atm!
|
# TODO: This is an unfortunate hack atm!
|
||||||
# Used to set input dimensions in network.
|
# Used to set input dimensions in network.
|
||||||
lower.begin_training(lower.ops.allocate((500, token_vector_width)))
|
lower.begin_training(lower.ops.allocate((500, token_vector_width)))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user