huanghao128/zh-nlp-demo

_keras_history错误

Opened this issue · 1 comments

AttributeError: in user code:

D:\Users\Administrator\Anaconda3\envs\python36\lib\site-packages\tensorflow\python\keras\engine\training.py:806 train_function  *
    return step_function(self, iterator)
D:\50_jupyter\07\01 zh-nlp-demo\keras_contrib\losses\crf_losses.py:54 crf_loss  *
    crf, idx = y_pred._keras_history[:2]

AttributeError: 'Tensor' object has no attribute '_keras_history'

keras 2.4.3
keras_contrib 2.0.8
python 36或37都试过

请问一下,问题解决了吗?可以分享一下方法吗?提前感谢啦