class_docstr: Mixin for Transformers that can generate embeddings.
class_docstr_tok: ["Mixin","for","Transformers","that","can","generate","embeddings","."]
code: def has_embeddings(self):
      # If the model family supports classification or detection tasks, its
      # embeddings from last_hidden_layer are meaningful and properly sized
      smodel = str(type(self.model)).split(".")
      model_name = smodel[-1][:-2].split("For")[0].replace("Model", "")
      module_name = "transformers"
  
      classif_model_name = f"{model_name}ForImageClassification"
      detection_model_name = f"{model_name}ForObjectDetection"
  
      _dynamic_import = __import__(
          module_name,
          fromlist=[classif_model_name, detection_model_name],
      )
  
      return hasattr(_dynamic_import, classif_model_name) or hasattr(
          _dynamic_import, detection_model_name
      )
  
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 1 for calling the TransformerEmbeddingsMixin obj's underlying member method code with example usage: obj.has_embeddings() and returns: unknown