FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix test. · MSavameri/TensorFlow.NET@2ef9a51 · GitHub

Repository navigation

Commit 2ef9a51

Browse files
committed
fix test.
1 parent d84ee13 commit 2ef9a51

5 files changed

Lines changed: 7 additions & 16 deletions

File tree

‎src/TensorFlowNET.Core/Gradients/ops.gradient_function_mapping.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public static void RegisterFromAssembly()
5252

5353
var results = m.Name switch
5454
{
55-
"_AddGrad" => math_grad._AddGrad(oper, out_grads),
55+
/*"_AddGrad" => math_grad._AddGrad(oper, out_grads),
5656
"_AddV2Grad" => math_grad._AddV2Grad(oper, out_grads),
5757
"_BiasAddGrad" => nn_grad._BiasAddGrad(oper, out_grads),
5858
"_CastGrad" => math_grad._CastGrad(oper, out_grads),
@@ -79,7 +79,7 @@ public static void RegisterFromAssembly()
7979
"_SigmoidGrad" => math_grad._SigmoidGrad(oper, out_grads),
8080
"_SumGrad" => math_grad._SumGrad(oper, out_grads),
8181
"_SubGrad" => math_grad._SubGrad(oper, out_grads),
82-
"_StridedSliceGrad" => array_grad._StridedSliceGrad(oper, out_grads),
82+
"_StridedSliceGrad" => array_grad._StridedSliceGrad(oper, out_grads),*/
8383
_ => g.InvokeMember(m.Name,
8484
BindingFlags.InvokeMethod,
8585
null,

‎src/TensorFlowNET.Core/Tensorflow.Binding.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<AssemblyName>TensorFlow.NET</AssemblyName>
66
<RootNamespace>Tensorflow</RootNamespace>
77
<TargetTensorFlow>2.2.0</TargetTensorFlow>
8-
<Version>0.60.4</Version>
8+
<Version>0.60.5</Version>
99
<LangVersion>9.0</LangVersion>
1010
<Nullable>enable</Nullable>
1111
<Authors>Haiping Chen, Meinrad Recheis, Eli Belash</Authors>

‎src/TensorFlowNET.Core/Tensors/Tensors.cs‎

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,8 @@ public class Tensors : IEnumerable<Tensor>, IDisposable
2727

2828
public Tensor this[int index]
2929
{
30-
get
31-
{
32-
if (Length == 1)
33-
return items[0][index];
34-
return items[index];
35-
}
36-
37-
set
38-
{
39-
items[index] = value;
40-
}
30+
get => items[index];
31+
set => items[index] = value;
4132
}
4233

4334
public Tensor this[params string[] slices]

‎src/TensorFlowNET.Keras/Tensorflow.Keras.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<Nullable>enable</Nullable>
88
<RootNamespace>Tensorflow.Keras</RootNamespace>
99
<Platforms>AnyCPU;x64</Platforms>
10-
<Version>0.6.4</Version>
10+
<Version>0.6.5</Version>
1111
<Authors>Haiping Chen</Authors>
1212
<Product>Keras for .NET</Product>
1313
<Copyright>Apache 2.0, Haiping Chen 2021</Copyright>

‎test/TensorFlowNET.Keras.UnitTest/Layers/LayersTest.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public void LayerNormalization()
159159
{
160160
var inputs = tf.constant(np.arange(10).reshape((5, 2)) * 10, dtype: tf.float32);
161161
var layer = keras.layers.LayerNormalization(axis: 1);
162-
var output = layer.Apply(inputs);
162+
Tensor output = layer.Apply(inputs);
163163
Assert.AreEqual((5, 2), output.shape);
164164
Assert.IsTrue(output[0].numpy().Equals(new[] { -0.99998f, 0.99998f }));
165165
}

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL