ConvertFusedBatchNorm returns uninitialized value when data_format = "NDHWC"
Hi, @froody 

Apologize for the delay and I think you're trying to convert input tensor of data format `NHWC` to `NDHWC` so I'm not sure whether is it possible to do it or not but what I think input tensor of data format should be equal to output tensor of data format so `NHWC` converts to `NCHW` and `NDHWC` converts to `NCDHW ` and even in log output it's saying clearly `INVALID_ARGUMENT: Rank of perm for transpose does not match with that of the input.`

You can refer this [official documentation](https://www.tensorflow.org/api_docs/python/tf/nn/conv3d) with [source code](https://github.com/tensorflow/tensorflow/blob/d5b57ca93e506df258271ea00fc29cf98383a374/tensorflow/python/ops/nn_ops.py#L5078-L5118) and Here are some references [Ref-1](https://oneapi-src.github.io/oneDNN/dev_guide_understanding_memory_formats.html), [Ref-2](https://forums.developer.nvidia.com/t/how-to-feed-a-3-channel-image-to-tensorrt/54502), [Ref-3](https://stackoverflow.com/questions/37689423/convert-between-nhwc-and-nchw-in-tensorflow) which may help you to resolve your issue 


The meaning of each letter might help to understand:

```
N: number of images in the batch
H: height of the image
W: width of the image
C: number of channels of the image (ex: 3 for RGB, 1 for grayscale)
D: Depth 
```
Please let me know if I've missed out anything here ? Thank you!

 @gaikwadrahul8 please look at my sample code provided. On which line do you think I'm creating an NHWC tensor? Or asking for a conversion from NHWC to NDHWC?

My point is that `ConvertFusedBatchNorm` in `convert_nodes.cc` has a bug. The code looks like

```
  ITensorProxyPtr output_tensor;

  if (data_format == "NCHW") {
    ...
  }
  if (data_format == "NHWC") {
    ...
  }
  params->outputs->push_back(TRT_TensorOrWeights(output_tensor));
```

If you instrument it to print out the value of `data_format` and then run the sample python code I provided above, you will see at one point `data_format = "NDHWC"`, which causes the code to skip both conversion blocks and assign the uninitialized value of `output_tensor` to `params->outputs`. 

If you instrument [this code](https://github.com/tensorflow/tensorflow/blob/4aec415b3f06b19c380d1a0ca92cc2de0d74cc21/tensorflow/compiler/tf2tensorrt/convert/convert_nodes.cc#L1508) to print out the values of `order_size` and `dims.nbDims` in the case where they aren't equal, you should see `order_size = 4` and `dims.nbDims` having some unreasonably large value, slightly less than `0xffff`, due to the uninitialized value introduced by the code segment above. Hi, @sachinprasadhs 

Could you please look into this issue ? Thank you! @froody , Does the recent commit here to the above function which you have pointed https://github.com/tensorflow/tensorflow/commit/1377c6e2574122a540153aff220c09c69dbec8a8 helps you in any way?   @sachinprasadhs which recent commit? Looking at master I still see code in the format below, which leaves output_tensor uninitialized when `data_format ==  "NDHWC"`

```
ITensorProxyPtr output_tensor;

if (data_format == "NCHW") {
...
}
if (data_format == "NHWC") {
...
}
params->outputs->push_back(TRT_TensorOrWeights(output_tensor));
```
<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Bug

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

Yes

### Source

source

### Tensorflow Version

v1.12.1-88697-g620bee79ab3 2.12.0-dev20230201

### Custom Code

No

### OS Platform and Distribution

Ubuntu 22.04

### Mobile device

_No response_

### Python version

Python 3.10

### Bazel version

5.3.0

### GCC/Compiler version

gcc-11

### CUDA/cuDNN version

CUDA-11.8/cudnn-8.7.0/TensorRT-8.5.3

### GPU model and memory

RTX3090

### Current Behaviour?

```shell
See code snippet:
https://github.com/tensorflow/tensorflow/blob/4aec415b3f06b19c380d1a0ca92cc2de0d74cc21/tensorflow/compiler/tf2tensorrt/convert/convert_nodes.cc#L4399-L4436

In the case of NDHWC layout (triggered by the code below) an uninitialized value is returned from ConvertFusedBatchNorm which causes an exception to be raised.

I would expect it to build correctly. Changing ConvertFusedBatchNorm to do the same thing for NDHWC as for NHWC gets rid of the crash, but I don't know if this is correct.
```


### Standalone code to reproduce the issue

```shell
import tensorflow as tf
import numpy as np
from tensorflow.keras.layers import (
    BatchNormalization,
    Conv3D,
    Dense,
    Flatten,
    Input,
)
from tensorflow.keras.models import Model
from tensorflow.python.compiler.tensorrt import trt_convert as trt

inputs = Input(shape=(24, 24, 64, 1), name="x")
x = inputs
x = Conv3D(16, (3, 3, 3), activation="relu", padding="same")(x)
x = BatchNormalization()(x)
x = Flatten()(x)
x = Dense(128, activation="relu")(x)
x = Dense(128)(x)
m = Model(inputs=[inputs], outputs=[x])

m.compile(
    optimizer=tf.keras.optimizers.Adam(learning_rate=0.001),
    loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True),
    metrics=[tf.keras.metrics.SparseCategoricalAccuracy()],
)

model_dir = "/tmp/model"
tf.keras.models.save_model(m, model_dir)

converter = trt.TrtGraphConverterV2(input_saved_model_dir=model_dir,
                        precision_mode=trt.TrtPrecisionMode.FP16)

trt_func = converter.convert()

def input_fn():
    a = np.random.rand(1024, 24, 24, 64, 1).astype(np.float32)
    yield [a]

converter.build(input_fn=input_fn)
```


### Relevant log output

```shell
2023-02-02 11:32:14.336729: W tensorflow/compiler/tf2tensorrt/kernels/trt_engine_op.cc:1104] TF-TRT Warning: Engine creation for TRTEngineOp_000_000 failed. The native segment will be used instead. Reason: INVALID_ARGUMENT: Rank of perm for transpose does not match with that of the input.
```
</details>