class_docstr: This abstract class represents a model to be trained. Rather than relying completely
  on the Pytorch Module, we modify the output spec of ``forward`` to be a dictionary.
  
  Models built using this API are still compatible with other pytorch models and can
  be used naturally as modules within other models - outputs are dictionaries, which
  can be unpacked and passed into other layers. One caveat to this is that if you
  wish to use an AllenNLP model inside a Container (such as nn.Sequential), you must
  interleave the models with a wrapper module which unpacks the dictionary into
  a list of tensors.
  
  In order for your model to be trained using the :class:`~allennlp.training.Trainer`
  api, the output dictionary of your Model must include a "loss" key, which will be
  optimised during the training process.
  
  Finally, you can optionally implement :func:`Model.get_metrics` in order to make use
  of early stopping and best-model serialization based on a validation metric in
  :class:`~allennlp.training.Trainer`. Metrics that begin with "_" will not be logged
  to the progress bar by :class:`~allennlp.training.Trainer`.
docstr: This method warns once if a user implements a model which returns a dictionary with
  values which we are unable to split back up into elements of the batch. This is controlled
  by a class attribute ``_warn_for_unseperable_batches`` because it would be extremely verbose
  otherwise.
docstr_tok: ["This","method","warns","once","if","a","user","implements","a","model","which","returns","a","dictionary","with","values","which","we","are","unable","to","split","back","up","into","elements","of","the","batch",".","This","is","controlled","by","a","class","attribute","``","_warn_for_unseperable_batches","``","because","it","would","be","extremely","verbose","otherwise","."]
code: def _maybe_warn_for_unseparable_batches(self, output_key):
      """
      This method warns once if a user implements a model which returns a dictionary with
      values which we are unable to split back up into elements of the batch. This is controlled
      by a class attribute ``_warn_for_unseperable_batches`` because it would be extremely verbose
      otherwise.
      """
      if output_key not in self._warn_for_unseparable_batches:
          logger.warning(
              "Encountered the {output_key} key in the model's return dictionary which "
              "couldn't be split by the batch size. Key will be ignored."
          )
          # We only want to warn once for this key,
          # so we set this to false so we don't warn again.
          self._warn_for_unseparable_batches.add(output_key)
  
imports: from __future__ import with_statement
  from __future__ import absolute_import
  import logging
  import os
  import numpy
  import torch
  from allennlp.common.checks import ConfigurationError
  from allennlp.common.params import Params
  from allennlp.common.registrable import Registrable
  from allennlp.data import Instance, Vocabulary
  from allennlp.data.dataset import Batch
  from allennlp.nn import util
  from allennlp.nn.regularizers import RegularizerApplicator
label_desc: Use image node_id 10 for calling the Model obj's underlying member method code with example usage: obj._maybe_warn_for_unseparable_batches(output_key) without return types