You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with file_io.FileIO('model.h5', mode='r') as input_f:
with file_io.FileIO(job_dir + '/model.h5', mode='w+') as output_f:
The above throws a UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte as the .h5 model file is a bytes file. To correct this issue use bytes mode for reading/writing using FileIO:
with file_io.FileIO('model.h5', mode='rb') as input_f:
with file_io.FileIO(job_dir + '/model.h5', mode='wb+') as output_f:
The text was updated successfully, but these errors were encountered:
Hi, right after I wrote my comment I realized that I was trying with file_io.FileIO('model.h5', mode='b') as input_f: ( 'b' instead of 'rb')
so you can probably delete my comments to clean, sorry :)
The above throws a
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte
as the .h5 model file is a bytes file. To correct this issue use bytes mode for reading/writing using FileIO:The text was updated successfully, but these errors were encountered: