Dynamically increasing the size of the network

Hi, lets say I have a basic network, like
net = Sequential()
net.add(Dense(10))
net.initialize()
trainer = Trainer(net.collect_params(), ‘adam’)

then future at some point I want to increase the capacity of my network, like
net.add(Dense(20), Dense(10))
what is the correct way of informing the trainer about the new Parameters.

for parameter in net.collect_params.values():
trainer._params.append(parameter)
parameter._set_trainer(trainer)
is this correct or false?
thanks.