              subword_features=True,
          ),
      )  # Set to False for character models, e.g. Chinese
      optimizer = create_default_optimizer(model.ops)
      tracker = ProgressTracker()
      msg.divider("Pre-training tok2vec layer")
      row_settings = {"widths": (3, 10, 10, 6, 4), "aligns": ("r", "r", "r", "r", "r")}
      msg.row(("#", "# Words", "Total Loss", "Loss", "w/s"), **row_settings)
      for epoch in range(nr_iter):
          for batch in util.minibatch_by_words(
 
</s> remove     )  # Set to False for character models, e.g. Chinese
 </s> add     ) </s> remove     loss = float((gradients ** 2).sum())
    return loss
 </s> add     return float(loss) </s> remove             subword_features=True,
 </s> add             subword_features=True,  # Set to False for Chinese etc </s> remove     gradients = get_vectors_loss(model.ops, docs, predictions, objective)
 </s> add     loss, gradients = get_vectors_loss(model.ops, docs, predictions, objective) </s> remove def make_update(model, docs, optimizer, drop=0.0, objective='cosine'):
 </s> add def make_update(model, docs, optimizer, drop=0.0, objective='L2'):
    tracker = ProgressTracker(frequency=10000)
              subword_features=True,
          ),
      )  # Set to False for character models, e.g. Chinese
      optimizer = create_default_optimizer(model.ops)
    tracker = ProgressTracker(frequency=10000)
      msg.divider("Pre-training tok2vec layer")
      row_settings = {"widths": (3, 10, 10, 6, 4), "aligns": ("r", "r", "r", "r", "r")}
      msg.row(("#", "# Words", "Total Loss", "Loss", "w/s"), **row_settings)
      for epoch in range(nr_iter):
          for batch in util.minibatch_by_words(
keep keep keep keep replace keep keep keep keep keep
 Remove unused code from spacy pretrain 
spacy/cli/pretrain.py