Thanks for your reply.
I used :
param = torch.nn.functional.pad(param, (0,1,0,0), "constant", 1.0).detach().requires_grad_()

Then check the shape and it is correct.
but after the optimization the parameters are the same as before and not extended.