DualAttention_for_Segmentation
DualAttention_for_Segmentation copied to clipboard
About train.py
firstly,thanks your code. I have some questions as follow:
- 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)
-
in train.py, why the code calculate the loss value separately? is it for the self-learning weight gamma in attention.py ?
-
if just calculate the loss between
feats_sum = pam_out + cam_out
and label, is ok?
@yiskw713