mirror of https://github.com/explosion/spaCy.git
Try dropping the Affine layer, conditionally
This commit is contained in:
parent
2148ae605b
commit
7b3f391f80
|
@ -251,7 +251,8 @@ def Tok2Vec(width, embed_size, pretrained_dims=0):
|
||||||
tok2vec = (
|
tok2vec = (
|
||||||
embed
|
embed
|
||||||
>> with_flatten(
|
>> with_flatten(
|
||||||
Affine(width, width+pretrained_dims)
|
(Affine(width, width+pretrained_dims)
|
||||||
|
if pretrained_dims else noop())
|
||||||
>> convolution ** 4,
|
>> convolution ** 4,
|
||||||
pad=4)
|
pad=4)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue