From 05b3172ddf3890efc6f2ba7978160dfe2659e5ef Mon Sep 17 00:00:00 2001 From: Oceania2018 Date: Wed, 28 Aug 2019 23:06:00 -0500 Subject: [PATCH] fix name for array_ops.ones --- src/TensorFlowNET.Core/Operations/array_ops.py.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/TensorFlowNET.Core/Operations/array_ops.py.cs b/src/TensorFlowNET.Core/Operations/array_ops.py.cs index 92fe2e3c..92f65906 100644 --- a/src/TensorFlowNET.Core/Operations/array_ops.py.cs +++ b/src/TensorFlowNET.Core/Operations/array_ops.py.cs @@ -260,8 +260,7 @@ namespace Tensorflow return tf_with(ops.name_scope(name, "ones", new { dims }), scope => { name = scope; - var shape = ops.convert_to_tensor(dims, dtype: TF_DataType.TF_INT32); - var output = gen_array_ops.fill(shape, constant_op.constant(1.0f, dtype: dtype), name: name); + var output = _constant_if_small(1, dims, dtype, name); return output; }); }