Skip to content

Commit

Permalink
fix saving a loaded model
Browse files Browse the repository at this point in the history
  • Loading branch information
GaijinOtohp committed Oct 18, 2023
1 parent 9e3654b commit 1b593a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/TensorFlowNET.Keras/Engine/Layer.Serialize.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ public override IDictionary<string, Trackable> _trackable_children(SaveType save
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);
}
}

0 comments on commit 1b593a6

Please sign in to comment.