class_docstr: Mixin for Transformers that can generate embeddings.
class_docstr_tok: ["Mixin","for","Transformers","that","can","generate","embeddings","."]
code: def _embed(self, args):
      inputs = self.image_processor(args, return_tensors="pt")
      with torch.no_grad():
          outputs = self.model.base_model(**inputs)
  
      return outputs.last_hidden_state[:, -1, :].cpu().numpy()
  
imports: import numpy
  from fiftyone.core.config import Config
  import fiftyone.core.labels
  from fiftyone.core.models import Model, EmbeddingsMixin
  import fiftyone.core.utils
label_desc: Use image node_id 4 for calling the TransformerEmbeddingsMixin obj's underlying member method code with example usage: obj._embed(args) and returns: outputs