Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempting to train fails on loss funtion with L1_Charbonnier_loss returning empty #30

Open
rfogarty opened this issue Apr 12, 2021 · 0 comments

Comments

@rfogarty
Copy link

We are experiencing the following attempting to train on some astrophotography images. I have created 128x128 patches of moon photos for our data set, and then used your generate Matlab routine to generate an HDF5 file.

We are attempting to train with: python main_lapsrn.py --nEpochs=50 --threads=1

Software versions do not appear to be specified, so we are using the following library versions in our conda environment:
Python: 3.8.5
PyTorch: 1.7.1
NumPy: 1.19.2
h5py: 2.10.0

We are experiencing the same error as well with SRDenseNet.

Epoch=1, lr=0.0001
Traceback (most recent call last):
File "main_lapsrn.py", line 140, in
main()
File "main_lapsrn.py", line 83, in main
train(training_data_loader, optimizer, model, criterion, epoch)
File "main_lapsrn.py", line 126, in train
print("===> Epoch{}: Loss: {:.10f}".format(epoch, iteration, len(training_data_loader), loss.data[0]))
IndexError: invalid index of a 0-dim tensor. Use tensor.item() in Python or tensor.item<T>() in C++ to convert a 0-dim tensor to a number

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant