From dc8a0a9447e47c272b2df9e09dfb9d58ec8d8b4c Mon Sep 17 00:00:00 2001 From: carb0n <58676303+carb0n@users.noreply.github.com> Date: Sun, 5 Jul 2020 21:43:07 -0400 Subject: [PATCH] some more fixes for some more build errors doesn't fix everything, but ought to fix a few errors --- src/TensorFlowNET.Core/Operations/image_ops_impl.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/TensorFlowNET.Core/Operations/image_ops_impl.cs b/src/TensorFlowNET.Core/Operations/image_ops_impl.cs index 01688e1d..d3de812e 100644 --- a/src/TensorFlowNET.Core/Operations/image_ops_impl.cs +++ b/src/TensorFlowNET.Core/Operations/image_ops_impl.cs @@ -16,6 +16,8 @@ using System; using System.Collections.Generic; +using System.Index; +using System.Range; using System.Text; using Tensorflow.Operations; using static Tensorflow.Binding; @@ -28,7 +30,7 @@ namespace Tensorflow => control_flow_ops.with_dependencies( _CheckAtLeast3DImage(image, require_static: false), image); - internal static Array _CheckAtLeast3DImage(Tensor image, bool require_static) + internal static Operation[] _CheckAtLeast3DImage(Tensor image, bool require_static) { try { @@ -54,7 +56,7 @@ namespace Tensorflow } if ( !image_shape[-3..^0].is_fully_defined() ) { - return new [] { + return new Operation[] { check_ops.assert_positive( array_ops.shape(image)[-3..^0], @"inner 3 dims of 'image.shape' @@ -65,7 +67,7 @@ namespace Tensorflow message: "'image' must be at least three-dimensional.") }; } else { - return new [] {}; + return new Operation[] {}; } } @@ -84,10 +86,10 @@ namespace Tensorflow internal static Tensor _random_flip(Tensor image, int flipindex, int seed, string scope_name) { - using ( scope = ops.name_scope(null, scope_name, image)) + using ( var scope = ops.name_scope(null, scope_name, image)) { image = ops.convert_to_tensor(image, name: "image"); - image = AssertAtLeast3DImage(image); + image = _AssertAtLeast3DImage(image); var shape = image.get_shape(); if ( shape.NDims == 3 || shape.NDims == null ) {