yaoing / DAN

Official implementation of DAN
MIT License
165 stars 35 forks source link

recommendation for program robustness #17

Closed Jiexin-Zheng closed 2 years ago

Jiexin-Zheng commented 2 years ago

hello, thanks for your work, I think you can add the following codes to the definition of PartitionLoss() function for program robustness:

        eps = sys.float_info.epsilon
        loss = torch.log(1+num_head/(var + eps))
yaoing commented 2 years ago

Thanks! Code has been updated!