Yes, torch.cat has a valid grad_fn and will not break the backpropagation.
What did you compare the outputs against? Your forward looks good and the added operations should be used. You could add additional print statements to the forward to make sure it’s really called and to check intermediate outputs.