ARM-software / scalpel

This is a PyTorch implementation of the Scalpel. Node pruning for five benchmark networks and SIMD-aware weight pruning for LeNet-300-100 and LeNet-5 is included.
BSD 3-Clause "New" or "Revised" License
38 stars 22 forks source link

TypeError: can't assign a bool to a torch.cuda.ByteTensor #1

Open MrLinNing opened 6 years ago

MrLinNing commented 6 years ago

I run the SIMD-Aware Weight Pruning, problem happened like this

File "main.py", line 231, in <module>
     simd_prune_op = SIMD_Prune_Op(model, args.threshold, args.width)
File "scalpel/SIMD_Aware_MNIST/../util/util.py", line 97, in __init__
    tmp_pruned[:, -1] = False
TypeError: can't assign a bool to a torch.cuda.ByteTensor

How to solve the problem? Thanks.

jiecaoyu commented 6 years ago

Hi @MrLinNing , sorry for late reply. Please refer to the pull request here. If it is still not working, please let me know.

ganeshdasikaarm commented 6 years ago

FYI, this is now merged in to the master branch.

-Ganesh

On Jun 4, 2018, at 3:40 PM, jiecaoyu notifications@github.com wrote:

Hi @MrLinNing , sorry for late reply. Please refer to the pull request here. If it is still not working, please let me know.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

jiecaoyu commented 6 years ago

@ganeshdasikaarm Hi Ganesh, thanks for merging the request!