Something like below tensorflow code:
result = []
input_downsampled = input
for i in range(3):
       result.append(self.forward(model, input_downsampled))
       if i != (2):
            input_downsampled = self.downsample(input_downsampled)
return result