It's not difficult to expand/convert from e.g. layers =2, rnn_size = 512 to layers = 4, rnn_size = 1024.
1. you may output all the parameters in each encoder/decoder for different configurations.
2. load the previous model
3. create a new encoder/decoder
4. copy or expand corresponding parameters for each matrix.
5. train with the newly generated encoder/decoder
BTW, personally, I don't think it is a good way to directly jump from 2*512 to 4*1024.
It's really big for 4*1024 network. Maybe you can start from 2*512 to 4*512 for instance.
That will be much easier.