@@ -14,6 +14,8 @@ | |||||
limitations under the License. | limitations under the License. | ||||
******************************************************************************/ | ******************************************************************************/ | ||||
using NumSharp; | |||||
namespace Tensorflow | namespace Tensorflow | ||||
{ | { | ||||
/// <summary> | /// <summary> | ||||
@@ -27,5 +29,6 @@ namespace Tensorflow | |||||
string name { get; } | string name { get; } | ||||
TF_DataType dtype { get; } | TF_DataType dtype { get; } | ||||
Tensor[] outputs { get; } | Tensor[] outputs { get; } | ||||
NDArray numpy(); | |||||
} | } | ||||
} | } |
@@ -15,6 +15,7 @@ | |||||
******************************************************************************/ | ******************************************************************************/ | ||||
using Google.Protobuf.Collections; | using Google.Protobuf.Collections; | ||||
using NumSharp; | |||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.IO; | using System.IO; | ||||
@@ -322,5 +323,7 @@ namespace Tensorflow | |||||
{ | { | ||||
return new TF_Input(op, input_idx); | return new TF_Input(op, input_idx); | ||||
} | } | ||||
public NDArray numpy() => throw new NotImplementedException(""); | |||||
} | } | ||||
} | } |
@@ -75,11 +75,11 @@ namespace TensorFlowNET.UnitTest.Basics | |||||
public void Save2() | public void Save2() | ||||
{ | { | ||||
var v1 = tf.get_variable("v1", shape: new TensorShape(3), initializer: tf.zeros_initializer); | |||||
var v2 = tf.get_variable("v2", shape: new TensorShape(5), initializer: tf.zeros_initializer); | |||||
var v1 = tf.compat.v1.get_variable("v1", shape: new TensorShape(3), initializer: tf.zeros_initializer); | |||||
var v2 = tf.compat.v1.get_variable("v2", shape: new TensorShape(5), initializer: tf.zeros_initializer); | |||||
var inc_v1 = v1.assign(v1 + 1.0f); | |||||
var dec_v2 = v2.assign(v2 - 1.0f); | |||||
var inc_v1 = v1.assign(v1.AsTensor() + 1.0f); | |||||
var dec_v2 = v2.assign(v2.AsTensor() - 1.0f); | |||||
// Add an op to initialize the variables. | // Add an op to initialize the variables. | ||||
var init_op = tf.global_variables_initializer(); | var init_op = tf.global_variables_initializer(); | ||||
@@ -12,7 +12,7 @@ using static Tensorflow.Binding; | |||||
namespace TensorFlowNET.UnitTest | namespace TensorFlowNET.UnitTest | ||||
{ | { | ||||
[TestClass] | |||||
[TestClass, Ignore] | |||||
public class MultithreadingTests : GraphModeTestBase | public class MultithreadingTests : GraphModeTestBase | ||||
{ | { | ||||
[TestMethod] | [TestMethod] | ||||