class_docstr: Pose Estimation for Mobile Device
class_docstr_tok: ["Pose","Estimation","for","Mobile","Device"]
code: def __init__(
      self,
      base_name,
      base_attrs=("features",),
      num_joints=17,
      pretrained_base=False,
      pretrained_ctx=cpu(),
      **kwargs,
  ):
      super(MobilePose, self).__init__(**kwargs)
  
      with self.name_scope():
          from ..model_zoo import get_model
  
          base_model = get_model(
              base_name, pretrained=pretrained_base, ctx=pretrained_ctx
          )
          self.features = nn.HybridSequential()
          if base_name.startswith("mobilenetv2"):
              self.features.add(base_model.features[:-1])
          elif base_name.startswith("mobilenetv3"):
              self.features.add(base_model.features[:-4])
          elif base_name.startswith("mobilenet"):
              self.features.add(base_model.features[:-2])
          else:
              for layer in base_attrs:
                  self.features.add(getattr(base_model, layer))
  
          self.upsampling = nn.HybridSequential()
          self.upsampling.add(
              nn.Conv2D(256, 1, 1, 0, use_bias=False),
              DUC(512, 2),
              DUC(256, 2),
              DUC(128, 2),
              nn.Conv2D(
                  num_joints,
                  1,
                  use_bias=False,
                  weight_initializer=initializer.Normal(0.001),
              ),
          )
  
file_path: gluon-cv/gluoncv/model_zoo/simple_pose/mobile_pose.py
imports: from __future__ import division
  from mxnet import initializer
  from mxnet.gluon import nn
  from mxnet.gluon.block import HybridBlock
  from mxnet.context import cpu
  from ...nn.block import DUC
label_desc: Use image node_id 1 to create a new MobilePose object from inherited base classes: HybridBlock with example: obj = MobilePose(base_name, base_attrs, num_joints, pretrained_base, pretrained_ctx)