keras
keras copied to clipboard
Fix TorchModuleWrapper serialization issue
Currently model with TorchModuleWrapper fails to save with the following error.
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 64: invalid start byte
I have tried with different encoding as experimental and found 'latin-1' works fine for saving and reloading along with some code changes to TorchModuleWrapper class. Atleast this change worked for the minimal code snippet as mentioned in #20860
May fixes #20860