class_docstr: MobileNet model trained on ImageNet dataset.
class_docstr_tok: ["MobileNet","model","trained","on","ImageNet","dataset","."]
code: def __init__(self, name="mobilenet_v2") -> None:
      # Initialize imagenet labels.
      self.labels = [""] * len(imagenet_labels.IMAGENET_2012_LABELS)
      self.label_to_idx = {}
      for i, l in imagenet_labels.IMAGENET_2012_LABELS.items():
          l = l.split(",", 1)[0]
          self.labels[i] = l
          self.label_to_idx[l] = i
  
      if name == "mobilenet_v2":
          self.model = tf.keras.applications.mobilenet_v2.MobileNetV2()
      elif name == "mobilenet":
          self.model = tf.keras.applications.mobilenet.MobileNet()
  
file_path: lit/lit_nlp/examples/models/mobilenet.py
imports: from lit_nlp.api import model
  from lit_nlp.api import types
  from lit_nlp.examples.models import imagenet_labels
  from lit_nlp.lib import image_utils
  import numpy
  import tensorflow
label_desc: Use image node_id 1 to create a new MobileNet object from inherited base classes: model with example: obj = MobileNet(name)