class_docstr: A constraint on the distance between two sentences' thought vectors.
  
  Args:
      word_embedding (textattack.shared.AbstractWordEmbedding): The word embedding to use
class_docstr_tok: ["A","constraint","on","the","distance","between","two","sentences","'","thought","vectors",".","Args",":","word_embedding","(","textattack.shared.AbstractWordEmbedding",")",":","The","word","embedding","to","use"]
code: def __init__(self, embedding=None, **kwargs):
      if embedding is None:
          embedding = WordEmbedding.counterfitted_GLOVE_embedding()
      if not isinstance(embedding, AbstractWordEmbedding):
          raise ValueError(
              "`embedding` object must be of type `textattack.shared.AbstractWordEmbedding`."
          )
      self.word_embedding = embedding
      super().__init__(**kwargs)
  
file_path: TextAttack/textattack/constraints/semantics/sentence_encoders/thought_vector.py
imports: import functools
  import torch
  from textattack.shared import AbstractWordEmbedding, WordEmbedding, utils
  from .sentence_encoder import SentenceEncoder
label_desc: Use image node_id 1 to create a new ThoughtVector object from inherited base classes: SentenceEncoder with example: obj = ThoughtVector(embedding)