TypeError: Expected int32, got list containing Tensors of type '_Message' instead.

在使用TensorFlow 0.11训练时遇到TypeError,错误信息指出期望int32类型,但得到的是包含_TensorMessage的列表。问题出现在inception_v3.py文件中,通过修改相关代码片段可以解决此问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在训练 tensorflow-0.11 时出现了 TypeError: Expected int32, got list containing Tensors of type '_Message' instead. 的错误

输出如下:

Traceback (most recent call last):
  File "train_image_classifier-dist.py", line 656, in <module>
    tf.app.run()
  File "/home/docker/tensorflow-0.11/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 43, in run
    sys.exit(main(sys.argv[:1] + flags_passthrough))
  File "train_image_classifier-dist.py", line 512, in main
    clones = model_deploy.create_clones(deploy_config, clone_fn, [batch_queue])
  File "/home/docker/tensorflow-master/tensorflow_models/slim/deployment/model_deploy.py", line 195, in create_clones
    outputs = model_fn(*args, **kwargs)
  File "train_image_classifier-dist.py", line 496, in clone_fn
    logits, end_points =
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值