keras版本与TensorFlow版本不匹配错误
参考:https://github.com/keras-team/keras/issues/10270
报错提示为: ~\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py in rnn(step_function, inputs, initial_states, go_backwards, mask, constants, unroll, input_length) 2960 parallel_iterations=32, 2961 swap_memory=True, -> 2962 maximum_iterations=input_length) 2963 last_time = final_outputs[0] 2964 output_ta = final_outputs[1] TypeError: while_loop() got an unexpected keyword argument 'maximum_iterations'
更改 keras的版本
Had the same issue with Keras 2.2.0 & tensorflow-gpu 1.8.0 . Reverted back to 2.1.6 and model fits without error.pip uninstall keraspip install keras==2.1.6
本文详细记录了在使用Keras与TensorFlow时遇到的版本不匹配问题及解决方案。当Keras版本2.2.0与TensorFlow-GPU 1.8.0结合时,会出现TypeError错误。通过回退到Keras 2.1.6版本,模型训练恢复正常,提供了一种快速解决问题的方法。
8万+

被折叠的 条评论
为什么被折叠?



