DDANet
DDANet copied to clipboard
RuntimeError: Boolean value of Tensor with more than one value is ambiguous
When I type python train.py, I faced the error, as following:
RuntimeError: Boolean value of Tensor with more than one value is ambiguous.

My folders is order, as following:
in the new_data:

I aslo google but I can't solve it. Please help me. thank you @nikhilroxtomar.
I think you should check the data type of the m_pred and m variables. Do they match the required data type required by the loss function?
Thank you @nikhilroxtomar. I am gona to check it.
Thank you @nikhilroxtomar
改为 nn.BCEWithLogitsLoss()(m_pred, m)
Thank you very much @auger1 and @nikhilroxtomar.