tensorflow.python.eager.core._FallbackException: This function does not handle the case of the path

在TensorFlow训练神经网络时,可能会遇到`_FallbackException`和`InvalidArgumentError`,特别是关于`Nan in summary histogram`的问题。这通常是由于损失函数计算中的log操作遇到0值或者学习率设置不恰当导致。解决方案包括使用`tf.clip_by_value`避免log(0),以及调整学习率。

大体报错:

错误一:

File "/home/ac/anaconda3/envs/tf-gpu/lib/python3.7/site-packages/tensorflow/python/ops/gen_summary_ops.py", line 464, in write_histogram_summary

tld.op_callbacks, writer, step, tag, values)

tensorflow.python.eager.core._FallbackException: This function does not handle the case of the path where all inputs are not already EagerTensors.

 

During handling of the above exception, another exception occurred:

 

Traceback (most recent call last):

 

错误二:

tensorflow.python.framework.errors_impl.InvalidArgumentError: Nan in summary histogram for: block1_conv2/kernel_0 [Op:WriteHistogramSummary]

2020-07-07 20:45:58.272736: W tensorflow/core/kernels/data/generator_dataset_op.cc:103] Error occurred when finalizing GeneratorDataset iterator: Failed precondition: Python interpreter state is not initialized. The process may be terminated.

[[{ {node PyFunc}}]]

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值