Hi,
I have to compare and change values of two models,
model 1 names block_model and the other is new_model.
I made this models with other methods, so
model 2 has structure like
,
and model 1 has same structure like
MSRN(
(sub_mean): MeanShift(3, 3, kernel_size=(1, 1), stride=(1, 1))
(add_mean): MeanShift(3, 3, kernel_size=(1, 1), stride=(1, 1))
(head): Sequential(
(0): DSConv2d(3, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
)
(body): Sequential(
(0): MSRB(
(conv_3_1): DSConv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
(conv_3_2): DSConv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
(conv_5_1): DSConv2d(64, 64, kernel_size=(5, 5), stride=(1, 1), padding=(2, 2), bias=False)
(conv_5_2): DSConv2d(128, 128, kernel_size=(5, 5), stride=(1, 1), padding=(2, 2), bias=False)
(confusion): DSConv2d(256, 64, kernel_size=(1, 1), stride=(1, 1), bias=False)
(relu): ReLU(inplace=True)
)
(1): MSRB(
(conv_3_1): DSConv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
(conv_3_2): DSConv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
(conv_5_1): DSConv2d(64, 64, kernel_size=(5, 5), stride=(1, 1), padding=(2, 2), bias=False)
(conv_5_2): DSConv2d(128, 128, kernel_size=(5, 5), stride=(1, 1), padding=(2, 2), bias=False)
(confusion): DSConv2d(256, 64, kernel_size=(1, 1), stride=(1, 1), bias=False)
(relu): ReLU(inplace=True)
)
โฆ
as you can see, model 2 has โModel( (model) : ~)โ at first.
I want to compare and change values of each convolution.
anyone know how to access to the same layer of both model?
now iโm using zip(block_model, newmodel), but itโs sequence is different because of โModel( (model) : ~)โ, but I donโt know how to get the same layer of both model at one time.
Please help me !
Thanks.