ai-content-maker/.venv/Lib/site-packages/thinc/tests/regression/issue519/program.py

17 lines
480 B
Python
Raw Permalink Normal View History

2024-05-03 04:18:51 +03:00
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])