charlesCXK / TorchSemiSeg

[CVPR 2021] CPS: Semi-Supervised Semantic Segmentation with Cross Pseudo Supervision
MIT License
504 stars 74 forks source link

Stop Gradient #45

Closed jcwang123 closed 2 years ago

jcwang123 commented 3 years ago

We notice that in the manuscript, Y should not backward the gradients. But in the codes, there are no operation to stop the gradients?

hetranger commented 3 years ago

_, pred = torch.max(output, dim=1) is equivalent to pred = torch.argmax(output, dim=1), which has no gradient backpropagated.

jcwang123 commented 3 years ago

thanks!