Closed YuhangMing closed 1 year ago
Hi @YuhangMing,
Yes, layer2 is a repeat for layer 1. This was a bug in the first version of the code and fixing the shared weights actually improves performance (check #5 for more discussion). We chose to keep the code in this form since it matches what's in the paper. Fixing this bug to use two separate layers or even using a larger backbone (eg, SyncMatch uses a modified ResNet18 instead of the five layer ResNet used here) should improve performance.
Let me know if you have any more questions.
Hi,
I am trying to understand the structure of the network and I found an interesting behaviour of the network.
I was trying to print the "named_parameters()" of the network using the command
and here is the output I got.
As you can see, there aren't any parameters related to
layer2
but when you print thestate_dict()
of the model, both layer1 and layer2 can be found. This feels like layer2 of the encode module is simply a repeat or an aliase of layer 1 of the encode module. btw I am using pytorch version 1.13.0.