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
Apologies if this is a noob question but I am new to the project.
Setup:
I created a TF model in Python using the tf.keras.optimizers.Adam() optimizer and persist it to disk. Then I wrote a C# TensorFlow.NET program that tries to load that model.
Observation:
The call to keras.models.load_model fails with a System.NotImplementedException at the following call stack:
at Tensorflow.Checkpoint.CheckpointPosition._queue_slot_variables(CheckpointPositioncheckpoint_position,Queue`1visit_queue)
at Tensorflow.Checkpoint.CheckpointPosition._restore_descendants()
at Tensorflow.Checkpoint.CheckpointPosition.restore(Trackable trackable)
at Tensorflow.Checkpoint.TrackableSaver.restore(String save_path, CheckpointOptions options)
at Tensorflow.Loader._restore_checkpoint()
at Tensorflow.Loader..ctor(SavedObjectGraph object_graph_proto, SavedModel saved_model_proto, String export_dir, CheckpointOptions ckpt_options, LoadOptions save_options, IDictionary`2 filters)
at Tensorflow.Loader.<>c__DisplayClass45_1.<load_partial>b__3(NameScope x)
at Tensorflow.Binding.tf_with[T](T py, Action`1 action)
at Tensorflow.Loader.load_partial(String export_dir, IDictionary`2 filters, Object tags, LoadOptions options)
at Tensorflow.Keras.Saving.SavedModel.KerasLoadModelUtils.load(String path, Boolean compile, LoadOptions options)
at Tensorflow.Keras.Saving.SavedModel.KerasLoadModelUtils.load_model(String filepath, IDictionary`2 custom_objects, Boolean compile, LoadOptions options)
at Tensorflow.Keras.Models.ModelsApi.load_model(String filepath, Boolean compile, LoadOptions options)
When changing from Adam to SGD optimizer, everything works fine (but performance is bad).
I narrowed the problem down to this line in the source code:
Description
Apologies if this is a noob question but I am new to the project.
Setup:
I created a TF model in Python using the
tf.keras.optimizers.Adam()
optimizer and persist it to disk. Then I wrote a C# TensorFlow.NET program that tries to load that model.Observation:
The call to
keras.models.load_model
fails with aSystem.NotImplementedException
at the following call stack:When changing from Adam to SGD optimizer, everything works fine (but performance is bad).
I narrowed the problem down to this line in the source code:
TensorFlow.NET/src/TensorFlowNET.Core/Checkpoint/restore.cs
Line 298 in 8cab730
➡️ My question: is this approach a known unsupported issue or am I doing something wrong.
Alternatives
No response
The text was updated successfully, but these errors were encountered: