  
      # STEP 2: Updating the model and printing again
      optimizer = Adam(0.001)
      set_dropout_rate(model, 0.2)
      # ugly hack to deal with Tok2Vec listeners
      tok2vec = None
      if model.has_ref("tok2vec") and model.get_ref("tok2vec").name == "tok2vec-listener":
          tok2vec = nlp.get_pipe("tok2vec")
      goldY = None
      for e in range(3):
          if tok2vec:
              tok2vec.update([Example.from_dict(x, {}) for x in X])
          Y, get_dX = model.begin_update(X)
 
</s> remove         if tok2vec:
            tok2vec.update([Example.from_dict(x, {}) for x in X])
        Y, get_dX = model.begin_update(X)
        if goldY is None:
            goldY = _simulate_gold(Y)
        dY = get_gradient(goldY, Y, model.ops)
        get_dX(dY)
        model.finish_update(optimizer)
 </s> add         if upstream_component:
            upstream_component.update(examples)
        pipe.update(examples) </s> remove     X = _get_docs()
    # The output vector might differ from the official type of the output layer
 </s> add  </s> remove     prediction = model.predict(X)
 </s> add     prediction = model.predict([ex.predicted for ex in examples]) </s> remove                     nlp.initialize(lambda: [Example.from_dict(x, {}) for x in X])
 </s> add                     examples = [Example.from_dict(x, {}) for x in _get_docs()]
                    nlp.initialize(lambda: examples)
    # ugly hack to deal with Tok2Vec/Transformer listeners
    upstream_component = None
    if model.has_ref("tok2vec") and "tok2vec-listener" in model.get_ref("tok2vec").name:
        upstream_component = nlp.get_pipe("tok2vec")
    if model.has_ref("tok2vec") and "transformer-listener" in model.get_ref("tok2vec").name:
        upstream_component = nlp.get_pipe("transformer")
  
      # STEP 2: Updating the model and printing again
      optimizer = Adam(0.001)
      set_dropout_rate(model, 0.2)
    # ugly hack to deal with Tok2Vec/Transformer listeners
    upstream_component = None
    if model.has_ref("tok2vec") and "tok2vec-listener" in model.get_ref("tok2vec").name:
        upstream_component = nlp.get_pipe("tok2vec")
    if model.has_ref("tok2vec") and "transformer-listener" in model.get_ref("tok2vec").name:
        upstream_component = nlp.get_pipe("transformer")
    # ugly hack to deal with Tok2Vec/Transformer listeners
    upstream_component = None
    if model.has_ref("tok2vec") and "tok2vec-listener" in model.get_ref("tok2vec").name:
        upstream_component = nlp.get_pipe("tok2vec")
    if model.has_ref("tok2vec") and "transformer-listener" in model.get_ref("tok2vec").name:
        upstream_component = nlp.get_pipe("transformer")
    # ugly hack to deal with Tok2Vec/Transformer listeners
    upstream_component = None
    if model.has_ref("tok2vec") and "tok2vec-listener" in model.get_ref("tok2vec").name:
        upstream_component = nlp.get_pipe("tok2vec")
    if model.has_ref("tok2vec") and "transformer-listener" in model.get_ref("tok2vec").name:
        upstream_component = nlp.get_pipe("transformer")
    # ugly hack to deal with Tok2Vec/Transformer listeners
    upstream_component = None
    if model.has_ref("tok2vec") and "tok2vec-listener" in model.get_ref("tok2vec").name:
        upstream_component = nlp.get_pipe("tok2vec")
    if model.has_ref("tok2vec") and "transformer-listener" in model.get_ref("tok2vec").name:
        upstream_component = nlp.get_pipe("transformer")
      goldY = None
      for e in range(3):
          if tok2vec:
              tok2vec.update([Example.from_dict(x, {}) for x in X])
          Y, get_dX = model.begin_update(X)
keep keep keep keep replace replace replace replace keep keep keep keep keep
 Fix 'debug model' for transformers + generalize (#7973)

* add overrides to docs

* fix debug model with transformer

* assume training data is set in config 
spacy/cli/debug_model.py