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
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:
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: