UserWarning: Update your `Model` call to the Keras 2 API: `Model(outputs=Tensor(

网友投稿 591 2022-10-01

UserWarning: Update your `Model` call to the Keras 2 API: `Model(outputs=Tensor(

UserWarning: Update your `Model` call to the Keras 2 API: `Model(outputs=Tensor(

我今天在调试代码的时候发现了这样一个警告,虽然对程序运行没什么大的影响,但是百度居然搜不到答案,这里我查了一点资料,我用的是keras 2

我的警告信息为:

HARRISON_data.py:114: UserWarning: Update your `Model` call to the Keras 2 API: `Model(outputs=Tensor("lo..., inputs=[

我的源代码为

model = Model( input=[positive_item_input, negative_item_input, user_input], output=loss)

只需要修改为:

model = Model( inputs=[positive_item_input, negative_item_input, user_input], outputs=loss)

没错,加一个s就不报警告了

参考文献

​​Cannot find Tensor() function to update Model to Keras2 API​​

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:论文笔记:Learning Social Image Embedding with Deep Multimodal Attention Networks
下一篇:小程序的下拉刷新问题(小程序强制刷新)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~