焦点损失:ValueError:批次直径=1必须小于等级(索引)=1

2024-09-26 22:07:48 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图使用Tensorflow1.14从https://github.com/artemmavrin/focal-loss/重新实现focal loss函数,但在使用示例进行测试时遇到以下错误-

ValueError:batch_dims=1必须小于秩(索引)=1

probs = tf.gather(probs, y_true, axis=-1, batch_dims=y_true_rank)

Tags: 函数httpsgithubcomtrue示例tf错误

热门问题