Based on the two things I hypothesized it could be doing, you could do the following:

Repeat the values

slice_output  # (1, 1, 224, 224)
output = slice_output.expand(1, 3, 224, 224)


Zero-fill the values

slice_output  # (1, 1, 224, 224)
zeros = torch.zeros_like(1,2, 224, 224)
output = torch.cat([slice_output, zeros], dim=1)