DenseFeatures Feature column combine order
Hello, @ishmnnit! tf.feature_column is not recommended for the new code of TF v2.13 as this is deprecated. Instead, feature preprocessing can be done directly using either [Keras preprocessing layers](https://www.tensorflow.org/guide/migrate/migrating_feature_columns) or through the one-stop utility [tf.keras.utils.FeatureSpace](https://www.tensorflow.org/api_docs/python/tf/keras/utils/FeatureSpace) built on top of them. See the [migration guide](https://tensorflow.org/guide/migrate) for details.
Thank you! @sushreebarsa That part I understand. it's just  I am working with a  large codebase, and moving to featurespace is a few months of effort, in between that I like some solutions that work. @ishmnnit Sorry to say but this api is deprecated now which is not actively supported. For any further queries you may open this issue in tf discussion [forum](https://discuss.tensorflow.org/) as there is a larger community there.
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/61920">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/61920">No</a>

### Issue type

Support

### Have you reproduced the bug with TensorFlow Nightly?

Yes

### Source

source

### TensorFlow version

2.13

### Custom code

Yes

### OS platform and distribution

_No response_

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

I have this code to create DenseFeatures layer.

 ```
       # Define the input for each feature column.
        inputs = {}
        for col in feature_columns:
            if type(col) == type(tf.feature_column.numeric_column("temp")):
                dtype = tf.float32
                key = col.key
            else:
                dtype = tf.int64
                key = col.categorical_column.key
            inputs[key] = tf.keras.layers.Input(name=key, shape=(), dtype=dtype)

        // Now use a DenseFeatures layer to combine them
        x = tf.keras.layers.DenseFeatures(feature_columns)(inputs)
```

-----------------

Now, I am trying to implement the output of the DenseFeatures layer for inference. I am facing a situation where I cannot use the TensorFlow model due to latency constraints.

However, my issue is that the manner in which DenseFeatures combines the inputs does not follow the order specified in feature_columns, nor is it sorted based on the feature names.

Is there a way I can determine the order in which these feature columns are combined within the DenseFeatures layer?

As I understand, in most places it is mentioned that it should follow the same order as the feature columns, but this is not what I am observing. I am using TensorFlow 2.13.

### Standalone code to reproduce the issue

```shell
# Define the input for each feature column.
        inputs = {}
        for col in feature_columns:
            if type(col) == type(tf.feature_column.numeric_column("temp")):
                dtype = tf.float32
                key = col.key
            else:
                dtype = tf.int64
                key = col.categorical_column.key
            inputs[key] = tf.keras.layers.Input(name=key, shape=(), dtype=dtype)

        // Now use a DenseFeatures layer to combine them
        x = tf.keras.layers.DenseFeatures(feature_columns)(inputs)
```


### Relevant log output

_No response_