Browse Source

add _captures, external/internal_captures

pull/594/head
carb0n GitHub 5 years ago
parent
commit
856f2ed3fe
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 0 deletions
  1. +18
    -0
      src/TensorFlowNET.Core/Graphs/Graph.cs

+ 18
- 0
src/TensorFlowNET.Core/Graphs/Graph.cs View File

@@ -560,5 +560,23 @@ namespace Tensorflow
{
return graph._handle;
}
public OrderedDictionary _captures => new OrderedDictionary();

public Tensor[] external_captures()
{
Tensor[] captures = new Tensor[this._captures.Count];
ICollection inner = this._captures.Keys; // c[0]
inner.CopyTo(captures, 0);
return captures;
}
public Tensor[] internal_captures()
{
Tensor[] captures = new Tensor[this._captures.Count];
ICollection inner = this._captures.Values; // c[1]
inner.CopyTo(captures, 0);
return captures;
}
}
}

Loading…
Cancel
Save