Browse Source

Merge pull request #1143 from dogvane/master

fix flip_left_right run bug
tags/v0.110.4-Transformer-Model
Haiping GitHub 2 years ago
parent
commit
6dd15f7353
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/TensorFlowNET.Core/Operations/image_ops_impl.cs

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

@@ -208,7 +208,7 @@ namespace Tensorflow
}

public static Tensor flip_left_right(Tensor image)
=> _flip(image, 1, "flip_left_right");
=> _flip(image, 0, "flip_left_right");

public static Tensor flip_up_down(Tensor image)
=> _flip(image, 1, "flip_up_down");
@@ -226,7 +226,7 @@ namespace Tensorflow
}
else if (shape.ndim == 4)
{
return gen_array_ops.reverse(image, ops.convert_to_tensor(new[] { flip_index + 1 }));
return gen_array_ops.reverse_v2(image, ops.convert_to_tensor(new[] { (flip_index + 1) % 2 }));
}
else
{


Loading…
Cancel
Save