By using list(model.parameters())
, I have obtained a parameter that looks like this:
Parameter containing:
0.4855 0.2326
-0.1219 0.4070
-0.1112 0.2800
-0.2189 0.2106
[torch.FloatTensor of size 4x2]
However, I need to be able to split this into a list of 8 separate Parameter
s. Is there any way of doing this?
I don’t think you can. If you wanted to do that, you could define these four 1x2 parameters separately and use torch.cat
to combine them during the forward. (Or use size 2 and use torch.stack
.)
Best regards
Thomas