              sgd = self.create_optimizer()
          self.model.initialize()
          return sgd
  
      @classmethod
      def Model(cls, n_tags, **cfg):
          return build_tagger_model(n_tags, **cfg)
  
      def add_label(self, label, values=None):
          raise NotImplementedError
  
      def use_params(self, params):
          with self.model.use_params(params):
 
</s> remove         self.model.initialize()
 </s> add  </s> remove     @classmethod
    def Model(cls, n_tags=None, **cfg):
        if cfg.get("pretrained_dims") and not cfg.get("pretrained_vectors"):
            raise ValueError(TempErrors.T008)
        if "tok2vec" in cfg:
            tok2vec = cfg["tok2vec"]
        else:
            config = {
                "width": cfg.get("token_vector_width", 96),
                "embed_size": cfg.get("embed_size", 2000),
                "pretrained_vectors": cfg.get("pretrained_vectors", None),
                "window_size": cfg.get("window_size", 1),
                "cnn_maxout_pieces": cfg.get("cnn_maxout_pieces", 3),
                "subword_features": cfg.get("subword_features", True),
                "char_embed": cfg.get("char_embed", False),
                "conv_depth": cfg.get("conv_depth", 4),
                "bilstm_depth": cfg.get("bilstm_depth", 0),
            }
            tok2vec = Tok2Vec(**config)
        return build_tagger_model(n_tags, tok2vec)

 </s> add  </s> remove     @classmethod
    def Model(cls, n_tags, tok2vec=None, **cfg):
        token_vector_width = util.env_opt("token_vector_width", 96)
        model = chain(
            tok2vec,
            Maxout(nO=token_vector_width*2, nI=token_vector_width, nP=3, dropout=0.0),
            LayerNorm(token_vector_width*2),
            Softmax(nO=n_tags, nI=token_vector_width*2)
        )
        return model

 </s> add  </s> remove     def Model(cls, *shape, **kwargs):
        """Initialize a model for the pipe."""
        raise NotImplementedError

    @classmethod
    def from_nlp(cls, nlp, **cfg):
        return cls(nlp.vocab, **cfg)
 </s> add     def from_nlp(cls, nlp, model, **cfg):
        return cls(nlp.vocab, model, **cfg) </s> remove         self.cfg["entity_width"] = self.kb.entity_vector_length
        if self.model is True:
            self.model = self.Model(**self.cfg)
 </s> add         nO = self.kb.entity_vector_length
        self.set_output(nO)
              sgd = self.create_optimizer()
          self.model.initialize()
          return sgd
  




      def add_label(self, label, values=None):
          raise NotImplementedError
  
      def use_params(self, params):
          with self.model.use_params(params):
keep keep keep keep replace replace replace replace keep keep keep keep keep
 Default settings to configurations (#4995)

* fix grad_clip naming

* cleaning up pretrained_vectors out of cfg

* further refactoring Model init's

* move Model building out of pipes

* further refactor to require a model config when creating a pipe

* small fixes

* making cfg in nn_parser more consistent

* fixing nr_class for parser

* fixing nn_parser's nO

* fix printing of loss

* architectures in own file per type, consistent naming

* convenience methods default_tagger_config and default_tok2vec_config

* let create_pipe access default config if available for that component

* default_parser_config

* move defaults to separate folder

* allow reading nlp from package or dir with argument 'name'

* architecture spacy.VocabVectors.v1 to read static vectors from file

* cleanup

* default configs for nel, textcat, morphologizer, tensorizer

* fix imports

* fixing unit tests

* fixes and clean up

* fixing defaults, nO, fix unit tests

* restore parser IO

* fix IO

* 'fix' serialization test

* add *.cfg to manifest

* fix example configs with additional arguments

* replace Morpohologizer with Tagger

* add IO bit when testing overfitting of tagger (currently failing)

* fix IO - don't initialize when reading from disk

* expand overfitting tests to also check IO goes OK

* remove dropout from HashEmbed to fix Tagger performance

* add defaults for sentrec

* update thinc

* always pass a Model instance to a Pipe

* fix piped_added statement

* remove obsolete W029

* remove obsolete errors

* restore byte checking tests (work again)

* clean up test

* further test cleanup

* convert from config to Model in create_pipe

* bring back error when component is not initialized

* cleanup

* remove calls for nlp2.begin_training

* use thinc.api in imports

* allow setting charembed's nM and nC

* fix for hardcoded nM/nC + unit test

* formatting fixes

* trigger build 
spacy/pipeline/pipes.pyx