pytorch-slimming icon indicating copy to clipboard operation
pytorch-slimming copied to clipboard

剪枝程序vggprune.py遇见的问题

Open xuemo188 opened this issue 5 years ago • 2 comments

Traceback (most recent call last): File "vggprune.py", line 73, in mask = weight_copy.gt(thre).float().cuda() RuntimeError: Expected object of type torch.cuda.FloatTensor but found type torch.FloatTensor for argument #2 'other' 我用的环境是python3.6 torch0.4.1

xuemo188 avatar Sep 19 '19 02:09 xuemo188

Have you solved the problem? I encountered the same problem as you.

Thea1 avatar Nov 30 '19 01:11 Thea1

Have you solved the problem? I encountered the same problem as you.

你们需要将其前面的thre变成cuda() 即 thre.cuda(),后再进行该mask的计算。

YuQi9797 avatar Jul 09 '20 06:07 YuQi9797