The gradients will propagate regardless where you put the calculation (well, except with torch.no_grad(): blocks an so).
Personally, I would just spell out the forward instead of using hooks. It’s more readable and probably less code overall, too.
def forward(self, x):
    y = x
    for y in range(2):
      y = self.net[i](y)
    other_pred = self.other_net(y)
    for y in range(2, len(self.net)):
      y = self.net[i](y)
    return y, other_pred

or so. Or you could just split the net into a lower and upper sequential part and call those instead of the for loops:
def forward(self, x):
    y = self.net_lower(x)
    other_pred = self.other_net(y)
    pred = self.net_upper(y)
    return pred, other_pred

Best regards
Thomas