class_docstr: InceptionV4 model.
class_docstr_tok: ["InceptionV4","model","."]
code: def __init__(
      self, class_dim: int = 1000, load_checkpoint: str = None
  ):
      super(InceptionV4, self).__init__()
      self._inception_stem = InceptionStem()
  
      self._inceptionA_1 = InceptionA(name="1")
      self._inceptionA_2 = InceptionA(name="2")
      self._inceptionA_3 = InceptionA(name="3")
      self._inceptionA_4 = InceptionA(name="4")
      self._reductionA = ReductionA()
  
      self._inceptionB_1 = InceptionB(name="1")
      self._inceptionB_2 = InceptionB(name="2")
      self._inceptionB_3 = InceptionB(name="3")
      self._inceptionB_4 = InceptionB(name="4")
      self._inceptionB_5 = InceptionB(name="5")
      self._inceptionB_6 = InceptionB(name="6")
      self._inceptionB_7 = InceptionB(name="7")
      self._reductionB = ReductionB()
  
      self._inceptionC_1 = InceptionC(name="1")
      self._inceptionC_2 = InceptionC(name="2")
      self._inceptionC_3 = InceptionC(name="3")
  
      self.avg_pool = AdaptiveAvgPool2d(1)
      self._drop = Dropout(p=0.2, mode="downscale_in_infer")
      stdv = 1.0 / math.sqrt(1536 * 1.0)
      self.out = Linear(
          1536,
          class_dim,
          weight_attr=ParamAttr(
              initializer=Uniform(-stdv, stdv), name="final_fc_weights"
          ),
          bias_attr=ParamAttr(name="final_fc_offset"),
      )
  
      if load_checkpoint is not None:
          model_dict = paddle.load(load_checkpoint)[0]
          self.set_dict(model_dict)
          print("load custom checkpoint success")
  
      else:
          checkpoint = os.path.join(
              self.directory, "inceptionv4_imagenet.pdparams"
          )
          if not os.path.exists(checkpoint):
              os.system(
                  "wget https://paddlehub.bj.bcebos.com/dygraph/image_classification/inceptionv4_imagenet.pdparams -O"
                  + checkpoint
              )
          model_dict = paddle.load(checkpoint)[0]
          self.set_dict(model_dict)
          print("load pretrained checkpoint success")
  
imports: import os
  import math
  import paddle
  from paddle import ParamAttr
  import paddle.nn
  import paddle.nn.functional
  from paddle.nn import Conv2d, BatchNorm, Linear, Dropout
  from paddle.nn import AdaptiveAvgPool2d, MaxPool2d, AvgPool2d
  from paddle.nn.initializer import Uniform
  from paddlehub.module.module import moduleinfo
  from paddlehub.module.cv_module import ImageClassifierModule
label_desc: Use image node_id 1 to create a new InceptionV4 object from inherited base classes: nn with example: obj = InceptionV4(class_dim, load_checkpoint)