  from pydantic import StrictInt
  from thinc.api import Model, chain, list2array, Linear, zero_init, use_ops
  
  from ...util import registry
  from .._layers import PrecomputableAffine
  from ...syntax._parser_model import ParserModel
  
  
  @registry.architectures.register("spacy.TransitionBasedParser.v1")
  def build_tb_parser_model(
 
</s> remove from thinc.api import Model, chain, reduce_mean, Linear, list2ragged, Logistic
from thinc.api import SparseLinear, Softmax
 </s> add from thinc.api import Model, reduce_mean, Linear, list2ragged, Logistic, ParametricAttention
from thinc.api import chain, concatenate, clone, Dropout
from thinc.api import SparseLinear, Softmax, softmax_activation, Maxout, reduce_sum, Relu, residual, expand_window
from thinc.api import HashEmbed, with_ragged, with_array, with_cpu, uniqued, FeatureExtractor </s> remove from ...attrs import ORTH
 </s> add from ..spacy_vectors import SpacyVectors
from ... import util
from ...attrs import ID, ORTH, NORM, PREFIX, SUFFIX, SHAPE, LOWER </s> remove from spacy.ml._layers import PrecomputableAffine
from spacy.ml._layers import _backprop_precomputable_affine_padding
 </s> add from spacy.ml._precomputable_affine import PrecomputableAffine, _backprop_precomputable_affine_padding </s> remove from spacy.tests.util import make_tempdir
 </s> add 
from .._precomputable_affine import PrecomputableAffine
  from pydantic import StrictInt
  from thinc.api import Model, chain, list2array, Linear, zero_init, use_ops
  
  from ...util import registry
from .._precomputable_affine import PrecomputableAffine
  from ...syntax._parser_model import ParserModel
  
  
  @registry.architectures.register("spacy.TransitionBasedParser.v1")
  def build_tb_parser_model(
keep keep keep keep replace keep keep keep keep keep
 Train textcat with config (#5143)

* bring back default build_text_classifier method

* remove _set_dims_ hack in favor of proper dim inference

* add tok2vec initialize to unit test

* small fixes

* add unit test for various textcat config settings

* logistic output layer does not have nO

* fix window_size setting

* proper fix

* fix W initialization

* Update textcat training example

* Use ml_datasets
* Convert training data to `Example` format
* Use `n_texts` to set proportionate dev size

* fix _init renaming on latest thinc

* avoid setting a non-existing dim

* update to thinc==8.0.0a2

* add BOW and CNN defaults for easy testing

* various experiments with train_textcat script, fix softmax activation in textcat bow

* allow textcat train script to work on other datasets as well

* have dataset as a parameter

* train textcat from config, with example config

* add config for training textcat

* formatting

* fix exclusive_classes

* fixing BOW for GPU

* bump thinc to 8.0.0a3 (not published yet so CI will fail)

* add in link_vectors_to_models which got deleted

Co-authored-by: Adriane Boyd <adrianeboyd@gmail.com> 
spacy/ml/models/parser.py