'ValueError: GRU(reset_after=False) is not compatible with GRU(reset_after=True)

How to solve this error which is raised when loading the weights from h5 file?

ValueError: GRU(reset_after=False) is not compatible with GRU(reset_after=True)

Github link : https://github.com/emilwallner/Screenshot-to-code Colab link : https://colab.research.google.com/drive/106_QEi_Wp6mfDDE1E2lPSPh7S9CABk6B#revisionId=0Byh7i7xj0YHlMU0xaTJCWDA3ZzZNTlA1VFFRWU5xQWdtc2tFPQ

dataset drive link: https://drive.google.com/drive/folders/1BTeUbXO7qBvOT4VkhOrr7SOcSocSZyeb?usp=sharing



Solution 1:[1]

set reset_after=True in your GRU layer

Solution 2:[2]

Probably the version of the TensorFlow is not compatible with other packages. Try using Tensorflow==1.15.0. You can install it by writing pip install TensorFlow==1.15.0

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 richard.mcflurry
Solution 2 Narcis