tf.keras.layers.Add with constant fails in tf.keras.models.load_model
Hi @elad-c ,
I tried to run your code on Colab using TF v2.15 and nightly versions, In nightly version it is working fine. Could you please check with nightly version. Please find the [gist](https://colab.sandbox.google.com/gist/Venkat6871/503fcbc95d8a64d692d252ac4ca83493/63000_2-15-nightly.ipynb) here for reference.

Thank you! Thanks!
So I should expect it to be solved in TF 2.17? Hi **@elad-c** ,

Could you please confirm if this issue is resolved for you ? Please feel free to close the issue if it is resolved ? 

Thank you! It's not resolved since I'm using a formal release, but I guess it will be resolved in the coming releases, so I'm closing the issue.
Thanks for your response. 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/63000">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/63000">No</a>

### Issue type

Bug

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

Yes

### Source

source

### TensorFlow version

2.15.0

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

Currently, it fails in building the Add layer:

> [/usr/local/lib/python3.10/dist-packages/keras/src/layers/merging/base_merge.py](https://localhost:8080/#) in <setcomp>(.0)
>      94                 f"Full input_shape received: {input_shape}"
>      95             )
> ---> 96         batch_sizes = {s[0] for s in input_shape if s} - {None}
>      97         if len(batch_sizes) > 1:
>      98             raise ValueError(
> 
> TypeError: unhashable type: 'list'

Expect not to fails...

### Standalone code to reproduce the issue

```shell
import os
import numpy as np
import tempfile
import tensorflow as tf
print(tf.__version__)

x = np.random.randn(1, 2, 2, 3)
_input = tf.keras.layers.Input(x.shape[1:])
const = tf.convert_to_tensor(np.ones((1, 1, 1, 3)).astype(np.float32))
_out = tf.keras.layers.Add()([_input, const])
model = tf.keras.Model(inputs=_input, outputs=_out)

_, tmp_h5_file = tempfile.mkstemp('.keras')
tf.keras.models.save_model(model, tmp_h5_file)
loaded_model = tf.keras.models.load_model(tmp_h5_file)  # <== this line fails
os.remove(tmp_h5_file)
```


### Relevant log output

```shell
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-3-b3b2b0b93053> in <cell line: 9>()
      7 _, tmp_h5_file = tempfile.mkstemp('.keras')
      8 tf.keras.models.save_model(model, tmp_h5_file)
----> 9 loaded_model = tf.keras.models.load_model(tmp_h5_file)
     10 os.remove(tmp_h5_file)

8 frames
/usr/local/lib/python3.10/dist-packages/keras/src/saving/saving_api.py in load_model(filepath, custom_objects, compile, safe_mode, **kwargs)
    252                 f"with the native Keras format: {list(kwargs.keys())}"
    253             )
--> 254         return saving_lib.load_model(
    255             filepath,
    256             custom_objects=custom_objects,

/usr/local/lib/python3.10/dist-packages/keras/src/saving/saving_lib.py in load_model(filepath, custom_objects, compile, safe_mode)
    279 
    280     except Exception as e:
--> 281         raise e
    282     else:
    283         return model

/usr/local/lib/python3.10/dist-packages/keras/src/saving/saving_lib.py in load_model(filepath, custom_objects, compile, safe_mode)
    244             # Construct the model from the configuration file in the archive.
    245             with ObjectSharingScope():
--> 246                 model = deserialize_keras_object(
    247                     config_dict, custom_objects, safe_mode=safe_mode
    248                 )

/usr/local/lib/python3.10/dist-packages/keras/src/saving/serialization_lib.py in deserialize_keras_object(config, custom_objects, safe_mode, **kwargs)
    726     safe_mode_scope = SafeModeScope(safe_mode)
    727     with custom_obj_scope, safe_mode_scope:
--> 728         instance = cls.from_config(inner_config)
    729         build_config = config.get("build_config", None)
    730         if build_config:

/usr/local/lib/python3.10/dist-packages/keras/src/engine/training.py in from_config(cls, config, custom_objects)
   3328                 # Revive Functional model
   3329                 # (but not Functional subclasses with a custom __init__)
-> 3330                 inputs, outputs, layers = functional.reconstruct_from_config(
   3331                     config, custom_objects
   3332                 )

/usr/local/lib/python3.10/dist-packages/keras/src/engine/functional.py in reconstruct_from_config(config, custom_objects, created_layers)
   1503                 while layer_nodes:
   1504                     node_data = layer_nodes[0]
-> 1505                     if process_node(layer, node_data):
   1506                         layer_nodes.pop(0)
   1507                     else:

/usr/local/lib/python3.10/dist-packages/keras/src/engine/functional.py in process_node(layer, node_data)
   1443                     input_tensors
   1444                 )
-> 1445             output_tensors = layer(input_tensors, **kwargs)
   1446 
   1447             # Update node index map.

/usr/local/lib/python3.10/dist-packages/keras/src/utils/traceback_utils.py in error_handler(*args, **kwargs)
     68             # To get the full stack trace, call:
     69             # `tf.debugging.disable_traceback_filtering()`
---> 70             raise e.with_traceback(filtered_tb) from None
     71         finally:
     72             del filtered_tb

/usr/local/lib/python3.10/dist-packages/keras/src/layers/merging/base_merge.py in <setcomp>(.0)
     94                 f"Full input_shape received: {input_shape}"
     95             )
---> 96         batch_sizes = {s[0] for s in input_shape if s} - {None}
     97         if len(batch_sizes) > 1:
     98             raise ValueError(

TypeError: unhashable type: 'list'
```
