From f026d91d376a88999f26780423f2516c83d0d9a0 Mon Sep 17 00:00:00 2001 From: carb0n <58676303+carb0n@users.noreply.github.com> Date: Thu, 9 Jul 2020 19:54:58 -0400 Subject: [PATCH] remove unnecessary (and broken) indexing code --- src/TensorFlowNET.Core/Operations/image_ops_impl.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/TensorFlowNET.Core/Operations/image_ops_impl.cs b/src/TensorFlowNET.Core/Operations/image_ops_impl.cs index be6cf12a..675e0004 100644 --- a/src/TensorFlowNET.Core/Operations/image_ops_impl.cs +++ b/src/TensorFlowNET.Core/Operations/image_ops_impl.cs @@ -16,9 +16,7 @@ using System; using System.Collections.Generic; -using System.Index; using System.Linq; -using System.Range; using System.Text; using Tensorflow.Operations; using static Tensorflow.Binding; @@ -50,16 +48,16 @@ namespace Tensorflow { throw new ValueError("\'image\' must be fully defined."); } - foreach (int x in image_shape[-3..^0]) + foreach (int x in image_shape[-3..]) { throw new ValueError("inner 3 dims of \'image.shape\' must be > 0: %s" % image_shape); } - if ( !image_shape[-3..^0].is_fully_defined() ) + if ( !image_shape[-3..].is_fully_defined() ) { return new Operation[] { check_ops.assert_positive( - array_ops.shape(image)[-3..^0], + array_ops.shape(image)[-3..], @"inner 3 dims of 'image.shape' must be > 0."), check_ops.assert_greater_equal(