Hi,
As I said, you will need to run cat for each forward pass.
The changes are never “communicated” to the input of cat or stack, these are out of place operations.
The weird behavior you see when you print a in the end is just because you changed a first.