From 87cf72d1c8af4d8316c5f4315fb99d9a00e9ec31 Mon Sep 17 00:00:00 2001 From: svlandeg Date: Fri, 29 Oct 2021 17:38:11 +0200 Subject: [PATCH] pass nO through --- spacy/ml/tb_framework.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spacy/ml/tb_framework.py b/spacy/ml/tb_framework.py index 10d263851..cd543131a 100644 --- a/spacy/ml/tb_framework.py +++ b/spacy/ml/tb_framework.py @@ -1,5 +1,5 @@ from typing import List, Tuple, Any, Optional -from thinc.api import Ops, Model, normal_init, chain, list2array, Linear +from thinc.api import Model, normal_init, chain, list2array, Linear from thinc.types import Floats1d, Floats2d, Floats3d, Ints2d, Floats4d import numpy from ..tokens.doc import Doc @@ -36,12 +36,12 @@ def TransitionModel( params={ "lower_W": None, # Floats2d W for the hidden layer "lower_b": None, # Floats1d bias for the hidden layer - "lower_pad": None, # Floats1d bias for the hidden layer + "lower_pad": None, # Floats1d padding for the hidden layer "upper_W": None, # Floats2d W for the output layer "upper_b": None, # Floats1d bias for the output layer }, dims={ - "nO": None, # Output size + "nO": nO, "nP": maxout_pieces, "nH": hidden_width, "nI": tok2vec_projected.maybe_get_dim("nO"),