-
Notifications
You must be signed in to change notification settings - Fork 58
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
Error in losses.py #33
Comments
Hi Natasha, sorry about the late reply. Last week was graduation week, and it was exciting and hectic :P hehe. I have made a clean version of the code (it's very different now but more stable). Can you try running it? |
Congratulations on graduation! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I get the following error when I try to train from scratch:
Traceback (most recent call last):
File "D:/Projects/LCFCN/main.py", line 49, in
main()
File "D:/Projects/LCFCN/main.py", line 40, in main
train.train(dataset_name, model_name, metric_name, path_history, path_model, path_opt, path_best_model, args.reset)
File "D:\Projects\LCFCN\train.py", line 76, in train
epoch=epoch)
File "D:\Projects\LCFCN\utils.py", line 30, in fit
loss = loss_function(model, batch)
File "D:\Projects\LCFCN\losses.py", line 31, in lc_loss
loss = compute_image_loss(S, counts)
File "D:\Projects\LCFCN\losses.py", line 75, in compute_image_loss
Target = (BgFgCounts.view(n*k) > 0).view(-1).float()
RuntimeError: shape '[1]' is invalid for input of size 2
Does this have something to do with the network output size? Or the image size?
How may I fix this?
The text was updated successfully, but these errors were encountered: