Browse Source

assert_equal #396

tags/v0.12
Oceania2018 6 years ago
parent
commit
18b22f51e1
2 changed files with 45 additions and 1 deletions
  1. +44
    -0
      src/TensorFlowNET.Core/APIs/tf.debugging.cs
  2. +1
    -1
      src/TensorFlowNET.Core/Operations/check_ops.cs

+ 44
- 0
src/TensorFlowNET.Core/APIs/tf.debugging.cs View File

@@ -0,0 +1,44 @@
/*****************************************************************************
Copyright 2018 The TensorFlow.NET Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
******************************************************************************/

namespace Tensorflow
{
public partial class tensorflow
{
/// <summary>
/// Assert the condition `x == y` holds element-wise.
/// </summary>
/// <typeparam name="T1"></typeparam>
/// <typeparam name="T2"></typeparam>
/// <param name="t1"></param>
/// <param name="t2"></param>
/// <param name="data"></param>
/// <param name="message"></param>
/// <param name="name"></param>
/// <returns></returns>
public Tensor assert_equal<T1, T2>(T1 t1,
T2 t2,
object[] data = null,
string message = null,
string name = null)
=> check_ops.assert_equal(t1,
t2,
data: data,
message: message,
name: name);

}
}

+ 1
- 1
src/TensorFlowNET.Core/Operations/check_ops.cs View File

@@ -26,7 +26,7 @@ namespace Tensorflow
/// <param name="t1"></param>
/// <param name="t2"></param>
/// <param name="name"></param>
public static Operation assert_equal(object t1, object t2, object[] data = null, string message = null, string name = null)
public static Operation assert_equal<T1, T2>(T1 t1, T2 t2, object[] data = null, string message = null, string name = null)
{
if (message == null)
message = "";


Loading…
Cancel
Save