0
I want to extend a tensor in PyTorch in the following way:
Let C
be a 3x4
tensor which requires_grad = True
. I want to have a new C
which is 3x5
tensor and C = [C, ones(3,1)]
(the last column is a one-vector, and others are the old C
) Moreover, I need requires_grad = True
for new C
.
I need to use this tensor as a parameter.
In a first step, I optimize the parameters in N
epochs.
In the second step, I need to extend the parameters (something I sad before, and I used
torch.nn.functional.pad
and the parameters are extended)
In the third step, I should optimize the extended parameters, but parameters are the same as before and not extended.
Is it possible to inform me about this problem?