keras icon indicating copy to clipboard operation
keras copied to clipboard

Fix TorchModuleWrapper serialization issue

Open Surya2k1 opened this issue 10 months ago • 8 comments

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

Surya2k1 avatar Feb 06 '25 17:02 Surya2k1