tensorflow / tensorflow/tensorflow

`Check failed` in `tf.raw_ops.UnbatchGrad` when the input of `original_input` is empty.

Open
#65,636 2 comments 0 reactions 1 assignee View on GitHub

@Kayyuri is already working on this.

Since Jun 3, 2026.

comp:ops stat:contribution welcome TF 2.16 type:bug
Dominant language
C++
Stars
200k
Forks
76.9k
Avg merge
2d 3h
Merged PRs (30d)
433

Description

Issue type

Bug

Have you reproduced the bug with TensorFlow Nightly?

Yes

Source

binary

TensorFlow version

tf 2.15

Custom code

No

OS platform and distribution

Linux Ubuntu 20.04

Mobile device

No response

Python version

3.10

Bazel version

No response

GCC/compiler version

No response

CUDA/cuDNN version

No response

GPU model and memory

No response

Current behavior?

When the input of original_input is empty, tf.raw_ops.UnbatchGrad will trigger Check failed of the input tensor dimension.

Standalone code to reproduce the issue
https://colab.research.google.com/drive/1ekseH5mJBvt3_SeK4MuAAM47U8qi5BEB?usp=sharing
Relevant log output
Check failed: d < dims() (0 vs. 0)
Aborted (core dumped)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.