You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.
Hi,
I was trying to run your code,
Exact command being:
$ CUDA_VISIBLE_DEVICES=0 python train.py --lr=0.1 --seed=20170922 --decay=1e-4
Before running the command I modified train.py to make download=True in both trainset and testset.
I got the following output:
_==> Preparing data..
Files already downloaded and verified
Files already downloaded and verified
==> Building model..
1
Using CUDA..
Epoch: 0
Traceback (most recent call last):
File "train.py", line 245, in
train_loss, reg_loss, train_acc = train(epoch)
File "train.py", line 165, in train
train_loss += loss.data[0]
IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number_
Could you help as to what I'm doing wrong? I ran the debugger then, it errors out here: File "train.py", line 165, in train
train_loss += loss.data[0]
IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number
The text was updated successfully, but these errors were encountered:
Hi,
I was trying to run your code,
Exact command being:
$ CUDA_VISIBLE_DEVICES=0 python train.py --lr=0.1 --seed=20170922 --decay=1e-4
Before running the command I modified train.py to make download=True in both trainset and testset.
I got the following output:
_==> Preparing data..
Files already downloaded and verified
Files already downloaded and verified
==> Building model..
1
Using CUDA..
Epoch: 0
Traceback (most recent call last):
File "train.py", line 245, in
train_loss, reg_loss, train_acc = train(epoch)
File "train.py", line 165, in train
train_loss += loss.data[0]
IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number_
Could you help as to what I'm doing wrong? I ran the debugger then, it errors out here:
File "train.py", line 165, in train
train_loss += loss.data[0]
IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number
The text was updated successfully, but these errors were encountered: