Fix low-data textcat

This commit is contained in:
Matthew Honnibal 2017-09-02 15:17:32 +02:00
parent 9e378bdac5
commit c0eaba8b28
1 changed files with 3 additions and 1 deletions

View File

@ -517,7 +517,9 @@ def build_text_classifier(nr_class, width=64, **cfg):
model = (
SpacyVectors
>> flatten_add_lengths
>> with_getitem(0, LN(Affine(width, 300)))
>> with_getitem(0,
Affine(width, 300)
)
>> ParametricAttention(width)
>> Pooling(sum_pool)
>> Residual(ReLu(width, width)) ** 2