-
Notifications
You must be signed in to change notification settings - Fork 536
[BUG Report]: An item with the same key has already been added. Key: keras_api #1026
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, thank you for reporting us this BUG. I'll fix it soon. :) |
What's more, UWP will break down in clrcore while using V1 LoadSession function under new version, but not very sure, need more test. I will abandon UWP. |
I have also experienced this error setting up a Conv1D layer: |
Here is a possible work around #976 (comment). I'll fix this BUG this weekend. Recently a little busy and forgot it🤣Sorry for that |
#1049 partially fixed this problem. Note that tf.net support loading models with |
Can the mentioned workaround be added any time soon? The issue still persists when loading and saving keras model for the 2nd time, it throws: can be reproduced e.g. using avaliable unit tests: // build and save model |
Description
When saving model, this error happened.
By reading Linq code, it seems like happening in TensorFlowNET.Keras.Engine.Layer.Serialize._trackable_children when concatenating model trackable with another trackable while they both have Key: keras_api
model trackable keys:
layer-0
layer-1
layer_with_weights-0
layer-2
keras_api
children keys:
non_trainable_variables
layers
variables
trainable_variables
keras_api
Reproduction Steps
load a keras pb model saved by python and save it immediately:
var model = keras.models.load_model(@"path");
model.summary();
model.save(@"path");
Known Workarounds
saveweght is fine
Configuration and Other Information
python tensorflow version: 2.10.0-GPU
TensorFlow.Redist version:2.10.0-CPU
Tensorflow.NET: 0.100.4
Tensorflow.Keras :0.10.4
.NET: 7.0
The text was updated successfully, but these errors were encountered: