code: def __init__(self):
      super(handpose_model, self).__init__()
  
      # these layers have no relu layer
      no_relu_layers = [
          "conv6_2_CPM",
          "Mconv7_stage2",
          "Mconv7_stage3",
          "Mconv7_stage4",
          "Mconv7_stage5",
          "Mconv7_stage6",
      ]
      # stage 1
      block1_0 = OrderedDict(
          [
              ("conv1_1", [3, 64, 3, 1, 1]),
              ("conv1_2", [64, 64, 3, 1, 1]),
              ("pool1_stage1", [2, 2, 0]),
              ("conv2_1", [64, 128, 3, 1, 1]),
              ("conv2_2", [128, 128, 3, 1, 1]),
              ("pool2_stage1", [2, 2, 0]),
              ("conv3_1", [128, 256, 3, 1, 1]),
              ("conv3_2", [256, 256, 3, 1, 1]),
              ("conv3_3", [256, 256, 3, 1, 1]),
              ("conv3_4", [256, 256, 3, 1, 1]),
              ("pool3_stage1", [2, 2, 0]),
              ("conv4_1", [256, 512, 3, 1, 1]),
              ("conv4_2", [512, 512, 3, 1, 1]),
              ("conv4_3", [512, 512, 3, 1, 1]),
              ("conv4_4", [512, 512, 3, 1, 1]),
              ("conv5_1", [512, 512, 3, 1, 1]),
              ("conv5_2", [512, 512, 3, 1, 1]),
              ("conv5_3_CPM", [512, 128, 3, 1, 1]),
          ]
      )
  
      block1_1 = OrderedDict(
          [
              ("conv6_1_CPM", [128, 512, 1, 1, 0]),
              ("conv6_2_CPM", [512, 22, 1, 1, 0]),
          ]
      )
  
      blocks = {}
      blocks["block1_0"] = block1_0
      blocks["block1_1"] = block1_1
  
      # stage 2-6
      for i in range(2, 7):
          blocks["block%d" % i] = OrderedDict(
              [
                  ("Mconv1_stage%d" % i, [150, 128, 7, 1, 3]),
                  ("Mconv2_stage%d" % i, [128, 128, 7, 1, 3]),
                  ("Mconv3_stage%d" % i, [128, 128, 7, 1, 3]),
                  ("Mconv4_stage%d" % i, [128, 128, 7, 1, 3]),
                  ("Mconv5_stage%d" % i, [128, 128, 7, 1, 3]),
                  ("Mconv6_stage%d" % i, [128, 128, 1, 1, 0]),
                  ("Mconv7_stage%d" % i, [128, 22, 1, 1, 0]),
              ]
          )
  
      for k in blocks.keys():
          blocks[k] = make_layers(blocks[k], no_relu_layers)
  
      self.model1_0 = blocks["block1_0"]
      self.model1_1 = blocks["block1_1"]
      self.model2 = blocks["block2"]
      self.model3 = blocks["block3"]
      self.model4 = blocks["block4"]
      self.model5 = blocks["block5"]
      self.model6 = blocks["block6"]
  
file_path: carefree-learn/cflearn/api/cv/third_party/openpose/model.py
imports: import torch
  import torch.nn
  from collections import OrderedDict
label_desc: Use image node_id 1 to create a new handpose_model object from inherited base classes: nn with example: obj = handpose_model()