Browse Source
Bug fix in KerasObjectLoader.cs
I added `ToArray()` so that there is no "The collection has changed" error after `_delete_tracking`.
tags/v0.110.4-Transformer-Model
RachamimYaakobov
GitHub
2 years ago
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
src/TensorFlowNET.Keras/Saving/KerasObjectLoader.cs
|
|
@@ -174,7 +174,7 @@ namespace Tensorflow.Keras.Saving |
|
|
|
} |
|
|
|
if(node is Functional functional) |
|
|
|
{ |
|
|
|
foreach(var name in functional.UnconditionalDependencyNames.Keys) |
|
|
|
foreach(var name in functional.UnconditionalDependencyNames.Keys.ToArray()) |
|
|
|
{ |
|
|
|
if(Regex.Match(name, @"^layer(_with_weights)?-[\d+]").Success) |
|
|
|
{ |
|
|
|