bug feedback
Not a bug, I'd say. Rules for `NaN` say that any operation involving `NaN` should result in a `NaN`, afaik But the input is INF, in this situation the output should be INF as well.
And I can get INF output in PyTorch when the input is INF and the operator is Conv2d. Does the same behavior occur in TF2.12? No, but I can get output -INF in TF2.12 with the same code, I wonder whether this output is correct or not. There might be an issue on the ordering of operations, but I am not sure that there is a guarantee on denormalized and special floats. TF convolutions call into NVIDIA's cuDNN library, which is producing the NaNs. Perhaps the internal cuDNN algorithm is multiplying some values by 0, which could be producing the NaNs because Inf * 0 = NaN.

I don't think it's feasible to avoid turning Infs into NaNs in some cases, as algorithms may assume multiplying by zero results in zero, and also we don't have any control over cuDNN's algorithms. So I'll close this issue. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60315">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60315">No</a>

<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Bug

### Have you reproduced the bug with TF nightly?

No

### Source

binary

### Tensorflow Version

tf2.5

### Custom Code

Yes

### OS Platform and Distribution

Windows 10 21H2 9044.2604

### Mobile device

_No response_

### Python version

3.7

### Bazel version

_No response_

### GCC/Compiler version

_No response_

### CUDA/cuDNN version

11.6

### GPU model and memory

_No response_

### Current Behaviour?

A bug happened!
When the input of Conv2D is inf, in_channels and out_channels are greater than 128, the output  is supposed to be inf, but got nan in fact.
And I can get correct output in PyTorch.

### Standalone code to reproduce the issue

```shell
data = np.array([np.inf for _ in range(1 * 128 * 6 * 6)])
data = np.reshape(data, newshape=[1, 128, 6, 6])
conv = tf.keras.layers.Conv2D(filters=256, kernel_size=3)
print(conv(data))
```


### Relevant log output

```shell
tf.Tensor(
[[[[nan nan nan ... nan nan nan]
   [nan nan nan ... nan nan nan]
   [nan nan nan ... nan nan nan]
   [nan nan nan ... nan nan nan]]

  [[nan nan nan ... nan nan nan]
   [nan nan nan ... nan nan nan]
   [nan nan nan ... nan nan nan]
   [nan nan nan ... nan nan nan]]

  [[nan nan nan ... nan nan nan]
   [nan nan nan ... nan nan nan]
   [nan nan nan ... nan nan nan]
   [nan nan nan ... nan nan nan]]

  ...

  [[nan nan nan ... nan nan nan]
   [nan nan nan ... nan nan nan]
   [nan nan nan ... nan nan nan]
   [nan nan nan ... nan nan nan]]

  [[nan nan nan ... nan nan nan]
   [nan nan nan ... nan nan nan]
   [nan nan nan ... nan nan nan]
   [nan nan nan ... nan nan nan]]

  [[nan nan nan ... nan nan nan]
   [nan nan nan ... nan nan nan]
   [nan nan nan ... nan nan nan]
   [nan nan nan ... nan nan nan]]]], shape=(1, 126, 4, 256), dtype=float32)
```
</details>