Python interpreter state is not initialized. The process may be terminated.

 Error occurred when finalizing GeneratorDataset iterator: Failed precondition: Python interpreter state is not initialized. The process may be terminated.
     [[{ {node PyFunc}}]]

当我在使用TensorFlow训练时,出现以上错误。

我也曾以为是,TensorFlow版本不对、cudnn版本不对、结果:

再往上看看还有其他错误提示:

    tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
tensorflow.python.framework.errors_impl.InvalidArgumentError:  logits and labels must be broadcastable: logits_size=[2,5] labels_size=[2,10]

哦,原来是我类别数量没改!!!

猜你喜欢

转载自blog.csdn.net/qq_55542491/article/details/129949727