Regression heads in Centernet network models

I’m working on the centernet code and found a query. In the code below, why is the code for predicting the width and height the same as the code for predicting the offset of center point? Does the difference between the two only appear when doing the loss function?

class resnet50_Head(nn.Module):
def init(self, num_classes=80, channel=64, bn_momentum=0.1):
super(resnet50_Head, self).init()
#-----------------------------------------------------------------#
#
# 128, 128, 64 → 128, 128, 64 → 128, 128, num_classes
# → 128, 128, 64 → 128, 128, 2
# → 128, 128, 64 → 128, 128, 2
#-----------------------------------------------------------------#
# predict heatmap
self.cls_head = nn.Sequential(
nn.Conv2d(64, channel,
kernel_size=3, padding=1, bias=False),
nn.BatchNorm2d(64, momentum=bn_momentum),
nn.ReLU(inplace=True),
nn.Conv2d(channel, num_classes,
kernel_size=1, stride=1, padding=0))
# predict w,h
self.wh_head = nn.Sequential(
nn.Conv2d(64, channel,
kernel_size=3, padding=1, bias=False),
nn.BatchNorm2d(64, momentum=bn_momentum),
nn.ReLU(inplace=True),
nn.Conv2d(channel, 2,
kernel_size=1, stride=1, padding=0))

    # predict offset of center point
    self.reg_head = nn.Sequential(
        nn.Conv2d(64, channel,
                  kernel_size=3, padding=1, bias=False),
        nn.BatchNorm2d(64, momentum=bn_momentum),
        nn.ReLU(inplace=True),
        nn.Conv2d(channel, 2,
                  kernel_size=1, stride=1, padding=0))
  
def forward(self, x):
    hm = self.cls_head(x).sigmoid_()
    wh = self.wh_head(x)
    offset = self.reg_head(x)
    return hm, wh, offset

So all I have to do to predict anything is to change the number of output channels (like 2 in the code below) in the following code?
nn.Conv2d(channel, 2.
kernel_size=1, stride=1, padding=0))

For example, if I want to predict the positions of the four vertices, I change the code to:

self.bbox_head = nn.Sequential(
nn.Conv2d(64, channel.
kernel_size=3, padding=1, bias=False),
nn.BatchNorm2d(64, momentum=bn_momentum),
nn.ReLU(inplace=True),
nn.Conv2d(channel, 8,
kernel_size=1, stride=1, padding=0))