From a1be07e2daaeb75542762566446379c2eec14861 Mon Sep 17 00:00:00 2001 From: Lj Miranda Date: Tue, 29 Nov 2022 11:32:38 +0800 Subject: [PATCH] Put back initializers in spancat config Whenever I remove model.scorer.init_w and model.scorer.init_b, I encounter an error in the test: SystemError: returned a result with an error set. My Thinc version is 8.1.5, but I can't seem to check what's causing the error. --- spacy/pipeline/spancat_exclusive.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spacy/pipeline/spancat_exclusive.py b/spacy/pipeline/spancat_exclusive.py index 5dcbacb67..18fc6c426 100644 --- a/spacy/pipeline/spancat_exclusive.py +++ b/spacy/pipeline/spancat_exclusive.py @@ -18,6 +18,12 @@ spancat_excl_default_config = """ @architectures = "spacy.SpanCategorizer.v1" scorer = {"@layers": "Softmax.v2"} +[model.scorer.init_W] +@initializers = "zero_init.v1" + +[model.scorer.init_b] +@initializers = "zero_init.v1" + [model.reducer] @layers = spacy.mean_max_reducer.v1 hidden_size = 128