diff --git a/src/TensorFlowNET.Console/MemoryBasicTest.cs b/src/TensorFlowNET.Console/MemoryBasicTest.cs
index 9586fe4e..f1e5e20a 100644
--- a/src/TensorFlowNET.Console/MemoryBasicTest.cs
+++ b/src/TensorFlowNET.Console/MemoryBasicTest.cs
@@ -1,4 +1,4 @@
-using NumSharp;
+using Tensorflow.Numpy;
using System;
using Tensorflow.Keras.ArgsDefinition;
using Tensorflow.Keras.Engine.DataAdapters;
diff --git a/src/TensorFlowNET.Console/MemoryFuncGraphTest.cs b/src/TensorFlowNET.Console/MemoryFuncGraphTest.cs
index fb532fca..8c39cf7a 100644
--- a/src/TensorFlowNET.Console/MemoryFuncGraphTest.cs
+++ b/src/TensorFlowNET.Console/MemoryFuncGraphTest.cs
@@ -1,4 +1,4 @@
-using NumSharp;
+using Tensorflow.Numpy;
using System;
using System.Collections.Generic;
using System.Text;
diff --git a/src/TensorFlowNET.Console/MemoryKerasTest.cs b/src/TensorFlowNET.Console/MemoryKerasTest.cs
index f9279b08..a58a2a34 100644
--- a/src/TensorFlowNET.Console/MemoryKerasTest.cs
+++ b/src/TensorFlowNET.Console/MemoryKerasTest.cs
@@ -1,4 +1,4 @@
-using NumSharp;
+using Tensorflow.Numpy;
using System;
using static Tensorflow.Binding;
using static Tensorflow.KerasApi;
diff --git a/src/TensorFlowNET.Console/MemoryMonitor.cs b/src/TensorFlowNET.Console/MemoryMonitor.cs
index d725ed23..80c64e70 100644
--- a/src/TensorFlowNET.Console/MemoryMonitor.cs
+++ b/src/TensorFlowNET.Console/MemoryMonitor.cs
@@ -2,7 +2,7 @@
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
-using NumSharp;
+using Tensorflow.Numpy;
using static Tensorflow.Binding;
using static Tensorflow.KerasApi;
@@ -12,12 +12,17 @@ namespace Tensorflow
{
public void WarmUp()
{
+ while (true)
+ {
+ var ones = np.ones((128, 128));
+ }
+
TensorShape shape = (1, 32, 32, 3);
np.arange(shape.size).astype(np.float32).reshape(shape.dims);
print($"tensorflow native version: v{tf.VERSION}");
tf.Context.ensure_initialized();
- var a = tf.constant(np.ones(10, 10));
+ var a = tf.constant(np.ones((10, 10)));
var b = tf.Variable(a);
var c = tf.Variable(b);
var d = b * c;
diff --git a/src/TensorFlowNET.Console/Tensorflow.Console.csproj b/src/TensorFlowNET.Console/Tensorflow.Console.csproj
index 49d7a08c..43d7a740 100644
--- a/src/TensorFlowNET.Console/Tensorflow.Console.csproj
+++ b/src/TensorFlowNET.Console/Tensorflow.Console.csproj
@@ -15,7 +15,7 @@
-
+
diff --git a/src/TensorFlowNET.Core/APIs/tf.array.cs b/src/TensorFlowNET.Core/APIs/tf.array.cs
index 5b0cf5b5..5a103598 100644
--- a/src/TensorFlowNET.Core/APIs/tf.array.cs
+++ b/src/TensorFlowNET.Core/APIs/tf.array.cs
@@ -14,7 +14,7 @@
limitations under the License.
******************************************************************************/
-using NumSharp;
+using Tensorflow.Numpy;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
diff --git a/src/TensorFlowNET.Core/Binding.Util.cs b/src/TensorFlowNET.Core/Binding.Util.cs
index ff02decd..7b6c1c35 100644
--- a/src/TensorFlowNET.Core/Binding.Util.cs
+++ b/src/TensorFlowNET.Core/Binding.Util.cs
@@ -14,8 +14,7 @@
limitations under the License.
******************************************************************************/
-using NumSharp;
-using NumSharp.Utilities;
+using Tensorflow.Numpy;
using System;
using System.Collections;
using System.Collections.Generic;
@@ -90,12 +89,12 @@ namespace Tensorflow
switch (obj)
{
case NDArray nd:
- return nd.ToString(false);
- case Array arr:
+ return nd.ToString();
+ /*case Array arr:
if (arr.Rank != 1 || arr.GetType().GetElementType()?.IsArray == true)
arr = Arrays.Flatten(arr);
var objs = toObjectArray(arr);
- return $"[{string.Join(", ", objs.Select(_tostring))}]";
+ return $"[{string.Join(", ", objs.Select(_tostring))}]";*/
default:
return obj?.ToString() ?? "null";
}
@@ -166,7 +165,7 @@ namespace Tensorflow
case ICollection arr:
return arr.Count;
case NDArray ndArray:
- return ndArray.ndim == 0 ? 1 : ndArray.shape[0];
+ return ndArray.ndim == 0 ? 1 : (int)ndArray.dims[0];
case IEnumerable enumerable:
return enumerable.OfType