class_docstr: Describes backbone information and provides utility functions.
      
class_docstr_tok: ["Describes","backbone","information","and","provides","utility","functions","."]
docstr: Download pre-trained weights for the specified backbone name.
  This name is in the format mobilenet{rows}_{alpha} where rows is the
  imagenet shape dimension and 'alpha' controls the width of the network.
  For more info check the explanation from the keras mobilenet script itself.
docstr_tok: ["Download","pre-trained","weights","for","the","specified","backbone","name",".","This","name","is","in","the","format","mobilenet","{","rows","}","_","{","alpha","}","where","rows","is","the","imagenet","shape","dimension","and","'alpha","'","controls","the","width","of","the","network",".","For","more","info","check","the","explanation","from","the","keras","mobilenet","script","itself","."]
code: def download_imagenet(self):
      """Download pre-trained weights for the specified backbone name.
      This name is in the format mobilenet{rows}_{alpha} where rows is the
      imagenet shape dimension and 'alpha' controls the width of the network.
      For more info check the explanation from the keras mobilenet script itself.
      """
  
      alpha = float(self.backbone.split("_")[1])
      rows = int(self.backbone.split("_")[0].replace("mobilenet", ""))
  
      # load weights
      if keras.backend.image_data_format() == "channels_first":
          raise ValueError(
              'Weights for "channels_last" format ' "are not available."
          )
      if alpha == 1.0:
          alpha_text = "1_0"
      elif alpha == 0.75:
          alpha_text = "7_5"
      elif alpha == 0.50:
          alpha_text = "5_0"
      else:
          alpha_text = "2_5"
  
      model_name = "mobilenet_{}_{}_tf_no_top.h5".format(
          alpha_text, rows
      )
      weights_url = (
          "https://github.com/fchollet/deep-learning-models/releases/download/v0.6/"
          + model_name
      )
      weights_path = keras.utils.get_file(
          model_name, weights_url, cache_subdir="models"
      )
  
      return weights_path
  
file_path: ImageAI/imageai_tf_deprecated/Detection/keras_retinanet/models/mobilenet.py
imports: from tensorflow import keras
  from ..utils.image import preprocess_image
  from .None import retinanet
  from .None import Backbone
label_desc: Use image node_id 2 for calling the MobileNetBackbone obj's underlying member method code with example usage: obj.download_imagenet() and returns: weights_path