Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tf.sparse.reduce_max should update the static shape #57148

Open
yoeldr opened this issue Aug 14, 2022 · 1 comment
Open

tf.sparse.reduce_max should update the static shape #57148

yoeldr opened this issue Aug 14, 2022 · 1 comment
Assignees
Labels
comp:ops OPs related issues stat:awaiting tensorflower Status - Awaiting response from tensorflower TF 2.9 Issues found in the TF 2.9 release (or RCs) type:feature Feature requests

Comments

@yoeldr
Copy link

yoeldr commented Aug 14, 2022

Click to expand!

Issue Type

Feature Request

Source

source

Tensorflow Version

tf 2.9.1

Custom Code

No

OS Platform and Distribution

No response

Mobile device

No response

Python version

No response

Bazel version

No response

GCC/Compiler version

No response

CUDA/cuDNN version

No response

GPU model and memory

No response

Current Behaviour?

tf.sparse.reduce_max(..., output_is_sparse=True) does not fill the result's static shape, although it can easily be done (like in the output_is_sparse=False case).

Standalone code to reproduce the issue

@tf.function
def f(n):
  t = tf.sparse.eye(n)
  tf.print(t.shape)
  result = tf.sparse.reduce_max(t, axis=1, keepdims=True, output_is_sparse=True)
  tf.print(result.shape)


f(3)

Relevant log output

TensorShape([3, 3])
TensorShape(None)
@google-ml-butler google-ml-butler bot added the type:feature Feature requests label Aug 14, 2022
@sushreebarsa sushreebarsa added comp:ops OPs related issues TF 2.9 Issues found in the TF 2.9 release (or RCs) labels Aug 16, 2022
@sushreebarsa
Copy link
Contributor

@gadagashwini I was able to replicate the issue, please find the gist here. Thank you!

@sachinprasadhs sachinprasadhs added the stat:awaiting tensorflower Status - Awaiting response from tensorflower label Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:ops OPs related issues stat:awaiting tensorflower Status - Awaiting response from tensorflower TF 2.9 Issues found in the TF 2.9 release (or RCs) type:feature Feature requests
Projects
None yet
Development

No branches or pull requests

4 participants