You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
480 B

from thinc.api import Relu, Softmax, chain, concatenate
from thinc.model import Model
from thinc.types import Floats2d
n_hidden = 32
dropout = 0.2
model1: Model[Floats2d, Floats2d] = chain(
Relu(nO=n_hidden, dropout=dropout), Relu(nO=n_hidden, dropout=dropout), Softmax()
)
model2: Model[Floats2d, Floats2d] = chain(
Relu(nO=n_hidden, dropout=dropout), Relu(nO=n_hidden, dropout=dropout), Softmax()
)
model3: Model[Floats2d, Floats2d] = concatenate(*[model1, model2])