Browse Source

remove unnecessary (and broken) indexing code

pull/571/head
carb0n GitHub 5 years ago
parent
commit
f026d91d37
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 5 deletions
  1. +3
    -5
      src/TensorFlowNET.Core/Operations/image_ops_impl.cs

+ 3
- 5
src/TensorFlowNET.Core/Operations/image_ops_impl.cs View File

@@ -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(


Loading…
Cancel
Save