aioz-ai / FADNet

Deep Federated Learning for Autonomous Driving (IV'22)
https://ai.aioz.io/research/FADNet1/
MIT License
35 stars 5 forks source link

Some confusions about network structure #1

Closed JackFroster closed 1 year ago

JackFroster commented 2 years ago

Hi, AIOZ AI! Thanks for your great work.

I'm a little confused about some of the snippets in the code.

  1. According to Fig 3 in the paper, Feature 1, Feature 2 and Feature 3 are not the output of ResBlock1, ResBlock2 and ResBlock3 respectively. However, the code is implemented like this.

    def forward(self, inputs):

    x1 = self.norm(inputs)
    x1 = self.conv1(x1)
    x1 = self.max_pool1(x1)
    
    x2 = self.res_block1(x1)
    x1 = self.conv2(x1)
    x3 = torch.add(x1, x2)
    
    x3_1 = x3.view(inputs.shape[0], -1)
    
    x4 = self.res_block2(x3)
    x3 = self.conv3(x3)
    x4 = torch.add(x3, x4)
    
    x4_1 = x4.view(inputs.shape[0], -1)
    
    x5 = self.res_block3(x4)
    x4 = self.conv4(x4)
    x5 = torch.add(x4, x5)
    
    x6 = x5.view(inputs.shape[0], -1)
    x6 = self.relu(x6)
    x6 = self.dropout(x6)
    
    return 0.7*self.fc(x6) + 0.1*x3_1.mean() + 0.1*x4_1.mean() + 0.1*x6.mean()
  2. In this line of code("0.7self.fc(x6) + 0.1x3_1.mean() + 0.1x4_1.mean() + 0.1x6.mean()"), what is the basis for choosing the weights ?

Gazeal commented 2 years ago

Hi, after rechecking the source codes, we have found that we have committed wrong version of the network. We have updated a correct one. Thank you for pointing out and sorry for the inconvenience.

JackFroster commented 2 years ago

Hi, after rechecking the source codes, we have found that we have committed wrong version of the network. We have updated a correct one. Thank you for pointing out and sorry for the inconvenience.

Thanks for your answer. I went over the code you submitted again. I found that the latest code still does not match the network structure in the paper.

For example, in the ResBlock section, do you need "torch.add()"? Is "FC" executed after Aggregation?😏

xuanbinh-nguyen96 commented 2 years ago

Hi, The committed network is the latest one that includes modifications after considering the recommendations of reviewers about some unreasonable/no-need parts of the described network (the figure) which may sometime cause unstable behavior during learning and a longer time to converge. If you want the network at the writing time, I have tracked and uploaded it. Incase there are any problems with the network, just let me know. Thank you for your constructed comments. By the way, I keep two versions of the nets in the source codes. The figure for the modified version will be updated later.