mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-14 13:47:13 +03:00
11 lines
321 B
Python
11 lines
321 B
Python
|
from thinc.api import Linear, zero_init
|
||
|
|
||
|
from ... import util
|
||
|
from ...util import registry
|
||
|
|
||
|
|
||
|
@registry.architectures.register("spacy.Tensorizer.v1")
|
||
|
def build_tensorizer(input_size, output_size):
|
||
|
input_size = util.env_opt("token_vector_width", input_size)
|
||
|
return Linear(output_size, input_size, init_W=zero_init)
|