PSSAttention icon indicating copy to clipboard operation
PSSAttention copied to clipboard

ValueError问题,outputs_info的类型为float32,而内部函数(“ fn”)的结果的类型为float64

Open nwulq opened this issue 5 years ago • 4 comments

之前在杭州AIS2019听过您所做的报告,最近复现了下您的实验TNet模型,出现了以下问题: WARNING (theano.gof.compilelock): Overriding existing lock by dead process '18676' (I am process '21120') Traceback (most recent call last): File "D:/py36/PSSAttention-master/TNet(+AS)/main_total.py", line 208, in train_erasing(a1_name, a2_name, a3_name, a4_name, a5_name, 1, args) File "D:/py36/PSSAttention-master/TNet(+AS)/main_total.py", line 25, in train_erasing model = TNet(args=args) # 初始化模型 File "D:\py36\PSSAttention-master\TNet(+AS)\layer.py", line 275, in init self.build_model() File "D:\py36\PSSAttention-master\TNet(+AS)\layer.py", line 316, in build_model H0_forward = self.LSTM_ctx(x=rnn_input) File "D:\py36\PSSAttention-master\TNet(+AS)\layer.py", line 44, in call [H, _], _ = theano.scan(fn=self.recurrence, sequences=rnn_input, outputs_info=[h0, c0]) File "D:\Anaconda\envs\py36\lib\site-packages\theano\scan_module\scan.py", line 1077, in scan scan_outs = local_op(*scan_inputs) File "D:\Anaconda\envs\py36\lib\site-packages\theano\gof\op.py", line 615, in call node = self.make_node(*inputs, **kwargs) File "D:\Anaconda\envs\py36\lib\site-packages\theano\scan_module\scan_op.py", line 546, in make_node inner_sitsot_out.type.dtype)) ValueError: When compiling the inner function of scan the following error has been encountered: The initial state (outputs_info in scan nomenclature) of variable IncSubtensor{Set;:int64:}.0 (argument number 1) has dtype float32, while the result of the inner function (fn) has dtype float64. This can happen if the inner function of scan results in an upcast or downcast.

这个错误我没有找到解决方法,请问下您清楚出现这种原因的状况吗

nwulq avatar Oct 16 '19 11:10 nwulq

Maybe you should check that there is a setting "floatX=float32" in your environment file: ".theanorc".

tangjialong avatar Oct 28 '19 09:10 tangjialong

您好,请问您解决了吗,我一直没找到解决办法,能麻烦您分享一下如何解决的吗,非常感谢。如有打扰,非常抱歉!

zhaocongyu avatar Dec 31 '20 07:12 zhaocongyu

不好意思,调试了好久没有解决,放弃了

---原始邮件--- 发件人: "kennard-max"<[email protected]> 发送时间: 2020年12月31日(星期四) 下午3:59 收件人: "DeepLearnXMU/PSSAttention"<[email protected]>; 抄送: "Author"<[email protected]>;"IU"<[email protected]>; 主题: Re: [DeepLearnXMU/PSSAttention] ValueError问题,outputs_info的类型为float32,而内部函数(“ fn”)的结果的类型为float64 (#5)

您好,请问您解决了吗,我一直没找到解决办法,能麻烦您分享一下如何解决的吗,非常感谢。如有打扰,非常抱歉!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

nwulq avatar Jan 05 '21 00:01 nwulq

抱歉,邮件刚看见,这个问题我之前问过原作者,最后也没解决,然后就没用过这个模型了

---原始邮件--- 发件人: "kennard-max"<[email protected]> 发送时间: 2020年12月31日(星期四) 下午3:59 收件人: "DeepLearnXMU/PSSAttention"<[email protected]>; 抄送: "Author"<[email protected]>;"IU"<[email protected]>; 主题: Re: [DeepLearnXMU/PSSAttention] ValueError问题,outputs_info的类型为float32,而内部函数(“ fn”)的结果的类型为float64 (#5)

您好,请问您解决了吗,我一直没找到解决办法,能麻烦您分享一下如何解决的吗,非常感谢。如有打扰,非常抱歉!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

nwulq avatar Feb 17 '21 07:02 nwulq