What is the reason for this operation? "Rescale pi so that the max pi for each gt equals to 1."
_, pi = self.sinkhorn(mu, nu, loss)
378 # Rescale pi so that the max pi for each gt equals to 1. #一定需要rescale吗?
379 rescale_factor, _ = pi.max(dim=1)
383 pi = pi / rescale_factor.unsqueeze(1)
What is the reason for this operation? "Rescale pi so that the max pi for each gt equals to 1."
_, pi = self.sinkhorn(mu, nu, loss)
378 # Rescale pi so that the max pi for each gt equals to 1. #一定需要rescale吗?
379 rescale_factor, _ = pi.max(dim=1)
383 pi = pi / rescale_factor.unsqueeze(1)