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

How can do I run other networks (ex: alexnet, vgg, inception_v3) ??

Open edwardcho opened this issue 7 years ago • 0 comments

The torchvision includes many networks. (alexnet, vgg11, etc...)

I could do run your sample according to TRAINING.md. But I couldn't do run other networks.

my status )

$ python imagenet.py -a vgg11 --data /data1/mirero/TESTBOARD/DLUTIL/DLUTIL_V5/classification/keras/cifar10_256 --epochs 10 --schedule 31 61 --gamma 0.1 -c checkpoint/imagenet/resnet18 --train-batch 16 --test-batch 16 --gpu-id 1

Epoch: [1 | 10] LR: 0.100000 Processingimagenet.py:249: UserWarning: invalid index of a 0-dim tensor. This will be an error in PyTorch 0.5. Use tensor.item() to convert a 0-dim tensor to a Python number losses.update(loss.data[0], inputs.size(0)) imagenet.py:250: UserWarning: invalid index of a 0-dim tensor. This will be an error in PyTorch 0.5. Use tensor.item() to convert a 0-dim tensor to a Python number top1.update(prec1[0], inputs.size(0)) imagenet.py:251: UserWarning: invalid index of a 0-dim tensor. This will be an error in PyTorch 0.5. Use tensor.item() to convert a 0-dim tensor to a Python number top5.update(prec5[0], inputs.size(0)) Processing | | (33/3125) Data: 0.078s | Batch: 0.083s | Total: 0:00:03 | ETA: 0:04:16 | Loss: nan | top1: 8.9015 | top5: 45.2652

================================> Loss is very big... (i guess divergence)

$ python imagenet.py -a inception_v3 --data /data1/mirero/TESTBOARD/DLUTIL/DLUTIL_V5/classification/keras/cifar10_256 --epochs 10 --schedule 31 61 --gamma 0.1 -c checkpoint/imagenet/resnet18 --train-batch 16 --test-batch 16 --gpu-id 1

=> RuntimeError: Expected tensor for argument #1 'input' to have the same dimension as tensor for 'result'; but 4 does not equal 2 (while checking arguments for cudnn_convolution)

Thanks, Edward Cho.

edwardcho avatar Oct 04 '18 06:10 edwardcho