Hi @Sayak_Paul ,
model.save
works before the training like this:
WARNING:tensorflow:Compiled the loaded model, but the compiled metrics have yet to be built. `model.compile_metrics` will be empty until you train or evaluate the model.
WARNING:tensorflow:Compiled the loaded model, but the compiled metrics have yet to be built. `model.compile_metrics` will be empty until you train or evaluate the model.
WARNING:absl:Found untraced functions such as conv2d_4_layer_call_fn, conv2d_4_layer_call_and_return_conditional_losses, layer_normalization_4_layer_call_fn, layer_normalization_4_layer_call_and_return_conditional_losses, dense_layer_call_fn while saving (showing 5 of 432). These functions will not be directly callable after loading.
INFO:tensorflow:Assets written to: custom_model2/assets
INFO:tensorflow:Assets written to: custom_model2/assets
However, it doesn’t work for saving after the training, with the following errors:
WARNING:absl:Found untraced functions such as conv2d_4_layer_call_fn, conv2d_4_layer_call_and_return_conditional_losses, layer_normalization_4_layer_call_fn, layer_normalization_4_layer_call_and_return_conditional_losses, dense_layer_call_fn while saving (showing 5 of 432). These functions will not be directly callable after loading.
INFO:tensorflow:Assets written to: model_save_dir/assets
INFO:tensorflow:Assets written to: model_save_dir/assets
---------------------------------------------------------------------------
UnimplementedError Traceback (most recent call last)
<ipython-input-44-118ce546ce88> in <module>()
----> 1 model.save("model_save_dir")
1 frames
/usr/local/lib/python3.7/dist-packages/keras/utils/traceback_utils.py in error_handler(*args, **kwargs)
65 except Exception as e: # pylint: disable=broad-except
66 filtered_tb = _process_traceback_frames(e.__traceback__)
---> 67 raise e.with_traceback(filtered_tb) from None
68 finally:
69 del filtered_tb
/usr/local/lib/python3.7/dist-packages/tensorflow/python/eager/context.py in sync_executors(self)
692 """
693 if self._context_handle:
--> 694 pywrap_tfe.TFE_ContextSyncExecutors(self._context_handle)
695 else:
696 raise ValueError("Context is not initialized.")
UnimplementedError: File system scheme '[local]' not implemented (file: 'model_save_dir/variables/variables_temp/part-00000-of-00001')
Encountered when executing an operation using EagerExecutor. This error cancels all future operations and poisons their output tensors.
Any suggestions for workarounds?
Thank you.