Browse Source

Fixed ambiguous overloads.

tags/v0.12
Eli Belash 6 years ago
parent
commit
a655882142
2 changed files with 1 additions and 12 deletions
  1. +0
    -11
      src/TensorFlowNET.Core/Tensors/TensorShape.cs
  2. +1
    -1
      src/TensorFlowNET.Core/tensorflow.cs

+ 0
- 11
src/TensorFlowNET.Core/Tensors/TensorShape.cs View File

@@ -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;
}
}

/// <summary>
/// An overload that can accept <see cref="Binding.None"/>.
/// </summary>


+ 1
- 1
src/TensorFlowNET.Core/tensorflow.cs View File

@@ -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);
}


Loading…
Cancel
Save