tengshaofeng / ResidualAttentionNetwork-pytorch

a pytorch code about Residual Attention Network. This code is based on two projects from
681 stars 166 forks source link

Shouldn't you record grad when testing? #14

Closed PistonY closed 5 years ago

PistonY commented 5 years ago

https://github.com/tengshaofeng/ResidualAttentionNetwork-pytorch/blob/88ed90f1b59f4b20e152495d3a5b6a19a4aa4232/Residual-Attention-Network/train_mixup.py#L56

When testing, model do not need grad. And this line caused me out of memory.

tengshaofeng commented 5 years ago

你的意思是with torch.no_grad: images = Variable(images.cuda()) ???

PistonY commented 5 years ago

@tengshaofeng 不需要Variable

tengshaofeng commented 5 years ago

好的

tengshaofeng commented 5 years ago

最近在做啥新研究

PistonY commented 5 years ago

我们把mobilefacenet跑到了论文水平,应该是开源项目的第一个,resnet跑不动就放弃了.

tengshaofeng commented 5 years ago

做人脸识别啊?里面用的arcloss还是什么损失函数