Browse Source

fix: Saving a loaded model

tags/v0.150.0-BERT-Model
SMURF 1 year ago
parent
commit
eb4ff88d39
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/TensorFlowNET.Keras/Engine/Layer.Serialize.cs

+ 1
- 1
src/TensorFlowNET.Keras/Engine/Layer.Serialize.cs View File

@@ -27,6 +27,6 @@ public abstract partial class Layer
children = new Dictionary<string, Trackable>();
}

return children.Concat(base._trackable_children(save_type, cache)).ToDictionary(x => x.Key, x => x.Value);
return children.Concat(base._trackable_children(save_type, cache)).GroupBy(x => x.Key).Select(g => g.First()).ToDictionary(x => x.Key, x => x.Value);
}
}

Loading…
Cancel
Save