Try dropping the Affine layer, conditionally

This commit is contained in:
Matthew Honnibal 2017-09-18 11:35:59 -05:00
parent 2148ae605b
commit 7b3f391f80
1 changed files with 2 additions and 1 deletions

View File

@ -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)
) )