DualAttention_for_Segmentation icon indicating copy to clipboard operation
DualAttention_for_Segmentation copied to clipboard

About train.py

Open yearing1017 opened this issue 4 years ago • 1 comments

firstly,thanks your code. I have some questions as follow:

  1. in danet.py, the output includes three feature maps, then in train.py, the code calculate the loss value separately, and add the three loss value together, but as followed code, as every epoch_loss is the sum of three loss, so shouldn't return epoch_loss / len(train_loader)/3?
 epoch_loss += loss.item()
 return epoch_loss / len(train_loader)
  1. in train.py, why the code calculate the loss value separately? is it for the self-learning weight gamma in attention.py ?

  2. if just calculate the loss between feats_sum = pam_out + cam_out and label, is ok?

yearing1017 avatar Apr 15 '20 02:04 yearing1017

@yiskw713

yearing1017 avatar Apr 15 '20 02:04 yearing1017