Calling tf.reduce_mean() along the ragged dimension of a tf.RaggedTensor created using from_uniform_row_length returns a tensor with the wrong shape.
@tilakrayal Do you mind if I take on this issue? Looks like a good beginner issue to me @melissamullen I am able to reproduce this from the master build. Let me see what's the right approach here @melissamullen,
Thank you for raising the issue. I tried to execute the given code and it was executed as mentioned. The **Uniform_row_length** method can be used to create RaggedTensors with multiple uniform outer dimensions. For example, a **RaggedTensor** with shape `[2, 2, None]` can be constructed with this method from a RaggedTensor values with shape `[4, None]`
```
values = tf.ragged.constant([[1, 2, 3], [4], [5, 6], [7, 8, 9, 10, 9], [7, 8, 9, 10, 11, 12]])
print(values.shape)


rt1 = tf.RaggedTensor.from_uniform_row_length(values, 5)
print(rt1)

print(rt1.shape)

output:
-------------

(5, None)
<tf.RaggedTensor [[[1, 2, 3], [4], [5, 6], [7, 8, 9, 10, 9], [7, 8, 9, 10, 11, 12]]]>
(1, 5, None)
```


**tf.math.Reduce_mean** reduces `input_tensor` along the dimensions given in axis by computing the mean of elements across the dimensions in axis. Unless keepdims is true, the rank of the tensor is reduced by 1 for each of the entries in axis, which must be unique. If keepdims is true, the reduced dimensions are retained with length 1.
```
#print("Averaging along ragged dimension (axis = 2)...\n")

# Reduce mean along ragged axis
print("* Averaged Tensor: *\n")
avg_ragged_dim = tf.reduce_mean(rt1, axis=2)
print(f"avg_ragged_dim = {avg_ragged_dim}\n")
print(f"Shape of avg_ragged_dim: {avg_ragged_dim.shape}\n")

output:
---------------
avg_ragged_dim = <tf.RaggedTensor [[2.0, 4.0, 5.5, 8.6, 9.5]]>

Shape of avg_ragged_dim: (1, None)
```
Kindly find the gist of it here. [Gist1](https://colab.research.google.com/gist/tilakrayal/e67baf0e4eb5a5dbfa6d00082ed3f1ba/untitled1051.ipynb)  [Gist2](https://colab.research.google.com/gist/tilakrayal/b9876f684d7c6d607333e1355c5cface/untitled1050.ipynb) Thank you!
 This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. 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/60067">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/60067">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.13.0-dev20230322

### Custom Code

Yes

### OS Platform and Distribution

Ubuntu 22.04.1 LTS

### Mobile device

_No response_

### Python version

3.8.8

### Bazel version

_No response_

### GCC/Compiler version

_No response_

### CUDA/cuDNN version

11.5

### GPU model and memory

_No response_

### Current Behaviour?
Calling tf.reduce_mean() along the ragged dimension of a tf.RaggedTensor created using from_uniform_row_length returns a tensor with the wrong shape.
```shell
Steps to Recreate:
1. Create a tf.RaggedTensor using from_uniform_row_length()
2. Call tf.reduce_mean() along the ragged dimension
3. Check shape of output
```


### Standalone code to reproduce the issue

```shell
import tensorflow as tf

values = [[[1, 2, 3], [4, 5]], [[6], [7, 8, 9]]]

rt1 = tf.ragged.constant(values, dtype=tf.int32)
print("\nTF Ragged Tensor Problem:\n------------------------\n")
print("* Ragged Tensor 1 *\n")
print(f"\nrt1 = {rt1}\n")
print(f"Shape of rt1: {rt1.shape}\n")
# TF Shape = (2, None, None)
# Real Shape = (2, 2, ragged)
# [
#     [
#         [1, 2, 3],
#         [4, 5]
#      ],
#      [
#         [6],
#         [7, 8, 9]
#     ]
# ]


rt2 = tf.RaggedTensor.from_uniform_row_length(rt1, 2)
print("* Ragged Tensor 2 *\n")
print(f"rt2 = {rt2}\n")
print(f"Shape of rt2: {rt2.shape}\n")
# TF Shape = (1, 2, None, None)
# Real Shape = (1, 2, 2, ragged)
# [
#     [
#         [
#             [1, 2, 3],
#             [4, 5]
#         ],
#         [
#             [6],
#             [7, 8, 9]
#         ]
#     ]
# ]

print("Averaging along ragged dimension (axis = 3)...\n")

# Reduce mean along ragged axis
print("* Averaged Tensor: *\n")
avg_ragged_dim = tf.reduce_mean(rt2, axis=3)
print(f"avg_ragged_dim = {avg_ragged_dim}\n")
print(f"Shape of avg_ragged_dim: {avg_ragged_dim.shape}\n")
print("Notice the 2 is gone instead of the None.\n")
# TF Shape = (1, None, None) --------> notice 2 is gone instead of None
# Real Shape = (1, 2, 2)
# [
#     [
#         [2.0, 4.5],
#         [6.0, 8.0]
#     ]
# ]
```


### Relevant log output

```shell
TF Ragged Tensor Problem:
------------------------

* Ragged Tensor 1 *


rt1 = <tf.RaggedTensor [[[1, 2, 3], [4, 5]],
 [[6], [7, 8, 9]]]>

Shape of rt1: (2, None, None)

* Ragged Tensor 2 *

rt2 = <tf.RaggedTensor [[[[1, 2, 3], [4, 5]],
  [[6], [7, 8, 9]]]]>

Shape of rt2: (1, 2, None, None)

Averaging along ragged dimension (axis = 3)...

* Averaged Tensor: *

avg_ragged_dim = <tf.RaggedTensor [[[2.0, 4.5],
  [6.0, 8.0]]]>

Shape of avg_ragged_dim: (1, None, None)

Notice the 2 is gone instead of the None.
```
</details>