From 3090e45837da6a72baacd0859e0b369889bdc6ed Mon Sep 17 00:00:00 2001 From: Oceania2018 Date: Sun, 3 Nov 2019 20:52:59 -0600 Subject: [PATCH] v0.12 released --- README.md | 7 +++++++ src/TensorFlowNET.Core/Gradients/gradients_util.cs | 11 +++-------- src/TensorFlowNET.Core/TensorFlowNET.Core.csproj | 3 ++- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 8744ba72..87e8042d 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,13 @@ In comparison to other projects, like for instance TensorFlowSharp which only pr ### How to use +| TensorFlow | tf 1.13 | tf 1.14 | tf 1.15 | tf 2.0 | +| ----------- | ------- | ------- | ------- | ------ | +| tf.net 0.12 | | x | | | +| tf.net 0.11 | x | x | | | +| tf.net 0.10 | x | x | | | +| tf.net 0.9 | x | | | | + Install TF.NET and TensorFlow binary through NuGet. ```sh ### install tensorflow C# binding diff --git a/src/TensorFlowNET.Core/Gradients/gradients_util.cs b/src/TensorFlowNET.Core/Gradients/gradients_util.cs index 55b771ed..c9322105 100644 --- a/src/TensorFlowNET.Core/Gradients/gradients_util.cs +++ b/src/TensorFlowNET.Core/Gradients/gradients_util.cs @@ -362,16 +362,11 @@ namespace Tensorflow grads[op.name] = op_grads; } var t_grads = op_grads[t.value_index]; - if (t_grads.Count == 0) - t_grads.Add(grad); - else + if (t_grads.Count > 0 && + control_flow_util.IsLoopSwitch(op)) op_grads[t.value_index][0] = grad; - - /*if (control_flow_util.IsLoopSwitch(op) && - t_grads[0] == null) - op_grads[t.value_index] = new List { grad }; else - t_grads.Add(grad);*/ + t_grads.Add(grad); } private static IEnumerable _NonEagerInputs(Operation op, Tensor[] xs) diff --git a/src/TensorFlowNET.Core/TensorFlowNET.Core.csproj b/src/TensorFlowNET.Core/TensorFlowNET.Core.csproj index fbad178e..de6e92cf 100644 --- a/src/TensorFlowNET.Core/TensorFlowNET.Core.csproj +++ b/src/TensorFlowNET.Core/TensorFlowNET.Core.csproj @@ -21,7 +21,8 @@ https://tensorflownet.readthedocs.io 0.12.0.0 Changes since v0.11.0: 1: Add ICanBeFlattened for nest.flatten2. -2: +2: Complete the WhileContext. +3: Add tf.nn.rnn_cell.BasicRNNCell and tf.nn.dynamic_rnn. 7.3 0.12.0.0 LICENSE