C医生 2019-03-26 09:10 采纳率: 0%
浏览 189

TypeError找不到解决方法,求教各位大佬

Keras做图像2分类,一直报错,提示:
TypeError Traceback (most recent call last)
D:\Anaconda3\lib\site-packages\theano\compile\pfunc.py in rebuild_collect_shared(outputs, inputs, replace, updates, rebuild_strict, copy_inputs_over, no_default_updates)
192 update_val = store_into.type.filter_variable(update_val,
--> 193 allow_convert=False)
194 except TypeError:

D:\Anaconda3\lib\site-packages\theano\tensor\type.py in filter_variable(self, other, allow_convert)
233 other=other,
--> 234 self=self))
235

TypeError: Cannot convert Type TensorType(int64, scalar) (of Variable Elemwise{add,no_inplace}.0) into Type TensorType(int32, scalar). You can try to manually convert Elemwise{add,no_inplace}.0 into a TensorType(int32, scalar).

求教各位大佬,怎么能解决?

  • 写回答

1条回答

  • CSDN-Ada助手 CSDN-AI 官方账号 2022-10-29 05:58
    关注
    不知道你这个问题是否已经解决, 如果还没有解决的话:

    如果你已经解决了该问题, 非常希望你能够分享一下解决方案, 写成博客, 将相关链接放在评论区, 以帮助更多的人 ^-^
    评论

报告相同问题?

悬赏问题

  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容