Hi @ptrblck:
When I run the command:
for name, _ in model.named_parameters():
    print(name)

The parameter W_ij is displayed, however, it is not optimized during the learning process.

Is there any way that I explicitly can include that parameter into the optimization process?
Why the parameter is shown in the command named_parameter in the for loop only (not when I execute print(model.named_parameters)) and not in the model.parameters used as input of optimizer = Adam(model.parameters())?

Here is the output:
W_ij
ReLUConv1.0.weight
ReLUConv1.0.bias
PrimaryCaps.0.weight
PrimaryCaps.0.bias
PrimaryCaps.1.weight
PrimaryCaps.1.bias
PrimaryCaps.2.weight
PrimaryCaps.2.bias
PrimaryCaps.3.weight
PrimaryCaps.3.bias
PrimaryCaps.4.weight
PrimaryCaps.4.bias
PrimaryCaps.5.weight
PrimaryCaps.5.bias
PrimaryCaps.6.weight
PrimaryCaps.6.bias
PrimaryCaps.7.weight
PrimaryCaps.7.bias
PrimaryCaps.8.weight
PrimaryCaps.8.bias
PrimaryCaps.9.weight
PrimaryCaps.9.bias
PrimaryCaps.10.weight
PrimaryCaps.10.bias
PrimaryCaps.11.weight
PrimaryCaps.11.bias
PrimaryCaps.12.weight
PrimaryCaps.12.bias
PrimaryCaps.13.weight
PrimaryCaps.13.bias
PrimaryCaps.14.weight
PrimaryCaps.14.bias
PrimaryCaps.15.weight
PrimaryCaps.15.bias
PrimaryCaps.16.weight
PrimaryCaps.16.bias
PrimaryCaps.17.weight
PrimaryCaps.17.bias
PrimaryCaps.18.weight
PrimaryCaps.18.bias
PrimaryCaps.19.weight
PrimaryCaps.19.bias
PrimaryCaps.20.weight
PrimaryCaps.20.bias
PrimaryCaps.21.weight
PrimaryCaps.21.bias
PrimaryCaps.22.weight
PrimaryCaps.22.bias
PrimaryCaps.23.weight
PrimaryCaps.23.bias
PrimaryCaps.24.weight
PrimaryCaps.24.bias
PrimaryCaps.25.weight
PrimaryCaps.25.bias
PrimaryCaps.26.weight
PrimaryCaps.26.bias
PrimaryCaps.27.weight
PrimaryCaps.27.bias
PrimaryCaps.28.weight
PrimaryCaps.28.bias
PrimaryCaps.29.weight
PrimaryCaps.29.bias
PrimaryCaps.30.weight
PrimaryCaps.30.bias
PrimaryCaps.31.weight
PrimaryCaps.31.bias
decoder.0.weight
decoder.0.bias
decoder.2.weight
decoder.2.bias
decoder.4.weight
decoder.4.bias