tf.compat.v1.nn.conv2d fails with assertion error: AttributeError: 'list' object has no attribute 'startswith'
Can I work on this issue?
@tilakrayal   @drewshark,
**tf.compat.v1.nn.conv2d** was deprecated. Could you please try the **tf.nn.conv2d** which computes a 2-D convolution given input and 4-D filters tensors. 

https://www.tensorflow.org/api_docs/python/tf/nn/conv2d

Also kindly find the gist of it [here](https://colab.research.google.com/gist/tilakrayal/5be93b2b5230e9853ef6e31201e37679/untitled1101.ipynb) where I tried with tf.nn.conv2d and the output was also as expected. Thank you! Hi, thanks for letting me know that it is deprecated. I am closing 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/60450">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/60450">No</a>

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

Bug

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

Yes

### Source

source

### Tensorflow Version

2.11.0

### Custom Code

Yes

### OS Platform and Distribution

Linux/Mac

### 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?

I was trying to use tf.compat.v1.nn.conv2d because of the compatibility issue in my project. However, tf.compat.v1.nn.conv2d fails with the following error message: 

```
AttributeError                            Traceback (most recent call last)
[<ipython-input-1-bc689394357a>](https://sjq4g20qeq-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20230427-060111-RC00_527538942#) in <cell line: 4>()
      2 input = tf.Variable(tf.random_normal([10, 28, 28, 3]))
      3 filters = tf.Variable(tf.random_normal([5, 5, 3, 32]))
----> 4 tf.compat.v1.nn.conv2d(input, filters, [1,1,1,1], "SAME", "NHWC", [1,1,1,1])

1 frames
[/usr/local/lib/python3.10/dist-packages/tensorflow/python/ops/nn_ops.py](https://sjq4g20qeq-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20230427-060111-RC00_527538942#) in conv2d(input, filter, strides, padding, use_cudnn_on_gpu, data_format, dilations, name, filters)
   2442   if data_format is None:
   2443     data_format = "NHWC"
-> 2444   channel_index = 1 if data_format.startswith("NC") else 3
   2445 
   2446   strides = _get_sequence(strides, 2, channel_index, "strides")

AttributeError: 'list' object has no attribute 'startswith'
```

Looks like the argument `data_format` is a list instead of a string inside this API.

### Standalone code to reproduce the issue

```shell
import tensorflow.compat.v1 as tf
input = tf.Variable(tf.random_normal([10, 28, 28, 3]))
filters = tf.Variable(tf.random_normal([5, 5, 3, 32]))
tf.compat.v1.nn.conv2d(input, filters, [1,1,1,1], "SAME", "NHWC", [1,1,1,1])
```


### Relevant log output

_No response_</details>