From a655882142d67c2bfa3287336c374d618e13bd99 Mon Sep 17 00:00:00 2001 From: Eli Belash Date: Sun, 8 Sep 2019 15:26:47 +0300 Subject: [PATCH] Fixed ambiguous overloads. --- src/TensorFlowNET.Core/Tensors/TensorShape.cs | 11 ----------- src/TensorFlowNET.Core/tensorflow.cs | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/TensorFlowNET.Core/Tensors/TensorShape.cs b/src/TensorFlowNET.Core/Tensors/TensorShape.cs index 4de72c6c..f434fba9 100644 --- a/src/TensorFlowNET.Core/Tensors/TensorShape.cs +++ b/src/TensorFlowNET.Core/Tensors/TensorShape.cs @@ -55,17 +55,6 @@ namespace Tensorflow } } - public TensorShape(params int[] dims) - { - switch (dims.Length) - { - case 0: shape = new Shape(new int[0]); break; - case 1: shape = Shape.Vector((int) dims[0]); break; - case 2: shape = Shape.Matrix(dims[0], dims[1]); break; - default: shape = new Shape(dims); break; - } - } - /// /// An overload that can accept . /// diff --git a/src/TensorFlowNET.Core/tensorflow.cs b/src/TensorFlowNET.Core/tensorflow.cs index 3f141879..494f2e89 100644 --- a/src/TensorFlowNET.Core/tensorflow.cs +++ b/src/TensorFlowNET.Core/tensorflow.cs @@ -63,7 +63,7 @@ namespace Tensorflow return gen_array_ops.placeholder(dtype, shape, name); } - public unsafe Tensor placeholder(TF_DataType dtype, object[] shape = null, string name = null) + public unsafe Tensor placeholder(TF_DataType dtype, object[] shape, string name = null) { return placeholder(dtype, new TensorShape(shape), name); }