utils.pytorch
utils.pytorch copied to clipboard
Utilities for Pytorch
Hi, I've been going over your implementation of label smoothing for cross-entropy, and I don't understand why, in this code in [cross_entropy.py](https://github.com/eladhoffer/utils.pytorch/blob/master/cross_entropy.py): ``` eps_sum = smooth_eps / num_classes eps_nll =...
Possible bug in LabelSmoothing for Binary Cross Entropy. Current Code: ``` smooth_eps = smooth_eps or 0 if smooth_eps > 0: target = target.float() target.add_(smooth_eps).div_(2.) ``` Shouldn't it be: ``` smooth_eps...
Very nice utils! It'd be cool if you provided examples in action for some/all of them. I am particularly interested in the cross entropy with label smoothing. Thanks! #
Thanks for composing this code, I am using quantize.py to quantize my model. And I meet the following issues: 1. model.register_buffer(n, p): string n cannnot include '.', so I replce...