cifar-10-python.tar.gz Data set downloaded by myself. root(/data/cifar.python/cifar-10-python.tar.gz)
then run sh scripts/cifar10_resnet.sh
but it not work
info:
=> do not use any checkpoint for resnet110 model
----------one epoch begin----------
the compression rate now is 0.700000
pruning_cifar10_resnet.py:305: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead.
input_var = torch.autograd.Variable(input, volatile=True)
pruning_cifar10_resnet.py:306: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead.
target_var = torch.autograd.Variable(target, volatile=True)
Traceback (most recent call last):
File "pruning_cifar10_resnet.py", line 467, in
main()
File "pruning_cifar10_resnet.py", line 177, in main
val_acc_1, val_los_1 = validate(test_loader, net, criterion, log)
File "pruning_cifar10_resnet.py", line 315, in validate
top1.update(prec1[0], input.size(0))
IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number
cifar-10-python.tar.gz Data set downloaded by myself. root(/data/cifar.python/cifar-10-python.tar.gz) then run sh scripts/cifar10_resnet.sh but it not work info: => do not use any checkpoint for resnet110 model ----------one epoch begin---------- the compression rate now is 0.700000 pruning_cifar10_resnet.py:305: UserWarning: volatile was removed and now has no effect. Use
main()
File "pruning_cifar10_resnet.py", line 177, in main
val_acc_1, val_los_1 = validate(test_loader, net, criterion, log)
File "pruning_cifar10_resnet.py", line 315, in validate
top1.update(prec1[0], input.size(0))
IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number
with torch.no_grad():
instead. input_var = torch.autograd.Variable(input, volatile=True) pruning_cifar10_resnet.py:306: UserWarning: volatile was removed and now has no effect. Usewith torch.no_grad():
instead. target_var = torch.autograd.Variable(target, volatile=True) Traceback (most recent call last): File "pruning_cifar10_resnet.py", line 467, inhope your reply