Thanks to visit codestin.com
Credit goes to github.com

Skip to content

tf.image.extract_glimpse crashes with negative input #51618

@lugalUrim

Description

@lugalUrim

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 16.04
  • Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: No
  • TensorFlow installed from (source or binary): binary
  • TensorFlow version (use command below): 2.4
  • Python version: 3.6

Standalone code to reproduce the issue

import tensorflow as tf
import numpy as np
x = np.arange(9).reshape([1,3,3,1])
res = tf.image.extract_glimpse(x, size=[1023, -63], offsets=[1023, 63], centered=False, normalized=False) # Crash

Describe the current behavior

It crashes when I execute the above code.

Describe the expected behavior
Should throw a ValueError.

Metadata

Metadata

Assignees

Labels

TF 2.4for issues related to TF 2.4comp:opsOPs related issuesstaleThis label marks the issue/pr stale - to be closed automatically if no activitystat:awaiting responseStatus - Awaiting response from authortype:bugBug

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions