model.branches[0][1].weight.copy_(model.branches[0][0].weight)

AttributeError: ‘AdaptiveAvgPool2d’ object has no attribute ‘weight’

image578×761 47.3 KB

If I understand correctly, this adresses as follows:
model -> _modules:branches -> _modules: 0 -> _modules:1 = AAP2d
I tried to track down where the weights are in debugging:

image1043×1171 94.6 KB

But I still cant find how to address it correctly, when to use the number indexing, or the . indexing?
I tried for example:

model.branches[1][0].conv1.weight   .copy_(  model.branches[0][0].conv1.weight  )

AttributeError: ‘Sequential’ object has no attribute ‘conv1’