栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

tensorflow.python.framework.errors

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

tensorflow.python.framework.errors

文章目录
    • 1.错误之处
    • 2.原因与解决

1.错误之处

tensorflow.python.framework.errors_impl.InvalidArgumentError: logits and labels must be broadcastable: logits_size=[8,1000] labels_size=[8,2]
[[node categorical_crossentropy/softmax_cross_entropy_with_logits (defined at /conda_3/PyCharm/Transer_Learning/DCR/InceptionV1手动搭建.py:238) ]] [Op:__inference_train_function_5688]
Function call stack:
train_function
2022-04-19 21:36:17.931892: W tensorflow/core/kernels/data/generator_dataset_op.cc:107] Error occurred when finalizing GeneratorDataset iterator: Failed precondition: Python interpreter state is not initialized. The process may be terminated.
[[{{node PyFunc}}]]

2.原因与解决

训练的图像类别是2类:

而我的模型给出的是1000个类别,所以改成训练的图像类别数,即可。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/822501.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号