class_docstr: A ``BagOfEmbeddingsEncoder`` is a simple :class:`Seq2VecEncoder` which simply sums the embeddings
  of a sequence across the time dimension. The input to this module is of shape ``(batch_size, num_tokens,
  embedding_dim)``, and the output is of shape ``(batch_size, embedding_dim)``.
  
  Parameters
  ----------
  embedding_dim: ``int``
      This is the input dimension to the encoder.
  averaged: ``bool``, optional (default=``False``)
      If ``True``, this module will average the embeddings across time, rather than simply summing
      (ie. we will divide the summed embeddings by the length of the sentence).
code: def __init__(self, embedding_dim, averaged=False):
      super(BagOfEmbeddingsEncoder, self).__init__()
      self._embedding_dim = embedding_dim
      self._averaged = averaged
  
file_path: magnitude/pymagnitude/third_party/allennlp/modules/seq2vec_encoders/boe_encoder.py
imports: from __future__ import division
  from __future__ import absolute_import
  import torch
  from allennlp.modules.seq2vec_encoders.seq2vec_encoder import Seq2VecEncoder
  from allennlp.nn.util import get_lengths_from_binary_sequence_mask
label_desc: Use image node_id 1 to create a new BagOfEmbeddingsEncoder object from inherited base classes: Seq2VecEncoder with example: obj = BagOfEmbeddingsEncoder(embedding_dim, averaged)