htqin / IR-Net

[CVPR 2020] This project is the PyTorch implementation of our accepted CVPR 2020 paper : forward and backward information retention for accurate binary neural networks.
177 stars 38 forks source link

k和t根本不会更新吧 #18

Closed pppLang closed 3 years ago

pppLang commented 3 years ago

https://github.com/htqin/IR-Net/blob/f63a5901d02836e2cf4405da1c68e066353a025f/ImageNet/ResNet18/1w1a/models/modules/binaryfunction.py#L16

这样写的话,给k和t返回的梯度都是None,根本不会更新吧

htqin commented 3 years ago

https://github.com/htqin/IR-Net/blob/f63a5901d02836e2cf4405da1c68e066353a025f/CIFAR-10/ResNet20/1w1a/trainer.py#L145