likyoo / Siam-NestedUNet

The pytorch implementation for "SNUNet-CD: A Densely Connected Siamese Network for Change Detection of VHR Images"
MIT License
260 stars 60 forks source link

UserWarning: Implicit dimension choice for log_softmax has been deprecated in CPU mode #4

Closed loviji closed 3 years ago

loviji commented 3 years ago

Hello @likyoo , I've runned train.py in Linux in CPU mode and get user userWarning

epoch 0 info 832 - 848: 42%|████████████████████████▏ | 52/125 [26:33<37:16, 30.64s/it]^C Traceback (most recent call last): ion choice for log_softmax has been deprecated. Change the call to include dim=X as an argument. logpt = F.log_softmax(input)

To fix this issue edited code in model.py file to logpt = F.log_softmax(input, dim=1)

likyoo commented 3 years ago

Hi @loviji , Thank you for pointing it out.

patrickhwood commented 2 years ago

Same issue in utils/metrics.py.