class_docstr: Hourglass model from Newell et al ECCV 2016.
class_docstr_tok: ["Hourglass","model","from","Newell","et","al","ECCV","2016","."]
code: def forward(self, x: Tensor) -> Tensor:
      out = []
      x = self.conv1(x)
      x = self.bn1(x)
      x = self.relu(x)
  
      x = self.layer1(x)
      x = self.maxpool(x)
      x = self.layer2(x)
      x = self.layer3(x)
  
      for i in range(self.num_stacks):
          y = self.hg[i](x)
          y = self.res[i](y)
          y = self.fc[i](y)
          score = self.score[i](y)
          out.append(score)
          if i < self.num_stacks - 1:
              fc_ = self.fc_[i](y)
              score_ = self.score_[i](score)
              x = x + fc_ + score_
  
      return y
  
imports: from typing import Any, Dict, List, NamedTuple, Optional, Tuple, Type, Union
  import torch
  import torch.nn.functional
  from torch import nn
  from torch.nn.functional import pixel_shuffle, softmax
  from kornia.core import Module, Tensor
label_desc: Use image node_id 4 for calling the HourglassNet obj's underlying member method code with example usage: obj.forward(x) and returns: y