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
parent
commit
4e0c3df4a4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/TensorFlowNET.Keras/Saving/KerasObjectLoader.cs

+ 1
- 1
src/TensorFlowNET.Keras/Saving/KerasObjectLoader.cs View File

@@ -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)
{


Loading…
Cancel
Save