ggsDing/SAM-CD

AttributeError: 'tuple' object has no attribute 'sigmoid'

emilyemliyM opened this issue · 8 comments

image

Do I need change the output tuple to the outC only?

Thanks a lot.

Hi,
I don't quite get the problem. Did you change the training settings?

我也是一样的问题

Hi, I don't quite get the problem. Did you change the training settings?

我也是遇到了同样的问题

Hi, I don't quite get the problem. Did you change the training settings?

我也是遇到了同样的问题

我解决了这个问题,在pred_CD.py文件中,out接收了net返回的三个tensor,变成了一个touple类型,但在train_SAM_CD.py文件中net的返回值是通过三个变量output, outA, outB = net(tensorA, tensorB)来接收的,我用同样的方式修改代码后,代码就成功跑起来了 @ggsDing @emilyemliyM @tudoulei

Hi, I don't quite get the problem. Did you change the training settings?

我也是遇到了同样的问题

我解决了这个问题,在pred_CD.py文件中,out接收了net返回的三个tensor,变成了一个touple类型,但在train_SAM_CD.py文件中net的返回值是通过三个变量output, outA, outB = net(tensorA, tensorB)来接收的,我用同样的方式修改代码后,代码就成功跑起来了 @ggsDing @emilyemliyM @tudoulei

谢谢,代码已更正 @tudoulei @supoman-lei @emilyemliyM

1703643836327

Hi, I don't quite get the problem. Did you change the training settings?

我也是遇到了同样的问题

我解决了这个问题,在pred_CD.py文件中,out接收了net返回的三个tensor,变成了一个touple类型,但在train_SAM_CD.py文件中net的返回值是通过三个变量output, outA, outB = net(tensorA, tensorB)来接收的,我用同样的方式修改代码后,代码就成功跑起来了 @ggsDing @emilyemliyM @tudoulei

谢谢,代码已更正 @tudoulei @supoman-lei @emilyemliyM

更正后的代码依旧不能运行

1703643836327

Hi, I don't quite get the problem. Did you change the training settings?

我也是遇到了同样的问题

我解决了这个问题,在pred_CD.py文件中,out接收了net返回的三个tensor,变成了一个touple类型,但在train_SAM_CD.py文件中net的返回值是通过三个变量output, outA, outB = net(tensorA, tensorB)来接收的,我用同样的方式修改代码后,代码就成功跑起来了 @ggsDing @emilyemliyM @tudoulei

谢谢,代码已更正 @tudoulei @supoman-lei @emilyemliyM

更正后的代码依旧不能运行

作者更正错了两行代码:
output = net(tensorA, tensorB) output, _, _ = F.sigmoid(output)
应该改为:
output, _, _ = net(tensorA, tensorB) output = F.sigmoid(output)

1703643836327

Hi, I don't quite get the problem. Did you change the training settings?

我也是遇到了同样的问题

我解决了这个问题,在pred_CD.py文件中,out接收了net返回的三个tensor,变成了一个touple类型,但在train_SAM_CD.py文件中net的返回值是通过三个变量output, outA, outB = net(tensorA, tensorB)来接收的,我用同样的方式修改代码后,代码就成功跑起来了 @ggsDing @emilyemliyM @tudoulei

谢谢,代码已更正 @tudoulei @supoman-lei @emilyemliyM

更正后的代码依旧不能运行

作者更正错了两行代码: output = net(tensorA, tensorB) output, _, _ = F.sigmoid(output) 应该改为: output, _, _ = net(tensorA, tensorB) output = F.sigmoid(output)

非常感谢!可以运行了