save.save_model in training.py directs to wrong file
@mibumi 
Could you please import `tensorflow.keras.models` instead of `tensorflow.python.keras.models`. 

> Anything under tf.python.* is private, intended for development only, rather than for public use.

> Importing from tensorflow.python or any other modules (including import tensorflow_core...) is not supported, and can break unannounced.So, it is suggested not to use anything with tf.python.*.

I was able to execute the given code without an error on Colab using TF v2.11. Please find the gist [here](https://colab.research.google.com/gist/tiruk007/57ff2c2f3fd68fedb8a4c6a5df357307/untitled140.ipynb) for reference.

Thank you ! That looks like the right answer. 

tensorflow.python.keras.models is not the right coide path, we're removing this from the package in 2.12, all of that code comes from the stand-alone keras package now. 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. Closing as stale. Please reopen if you'd like to work on this further. 

Thanks ! 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/59776">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/59776">No</a>

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

Bug

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

No

### Source

source

### Tensorflow Version

tf 2.11

### Custom Code

No

### OS Platform and Distribution

Linux Ubuntu 18.04

### Mobile device

_No response_

### Python version

_No response_

### Bazel version

_No response_

### GCC/Compiler version

_No response_

### CUDA/cuDNN version

cudatoolkit=11.2.2 cudnn=8.1.0

### GPU model and memory

_No response_

### Current Behaviour?

Hey,

so I stumbled into this while trying to save a more complex custom model than the one I'll discuss here and getting errors that were reported already in other issues but had remained unsolved. I knew from my dealing with the errors in my other model that saving my model worked fine in TF2.3 but crashed in 2.11 and I had my suspicions as to what caused the problem.
So I created a dummy test that would throw an error (TypeError: 'int' object is not iterable) to be able to check how TF goes through the source code. I executed this once with my old TF2.3 installation and once with my current TF 2.11 installation (did this in 2 different virtual environments).

In both version when calling save on a Keras model that then essentially executes 

```
save.save_model(self, filepath, overwrite, include_optimizer, save_format,
                    signatures, options, save_traces)
```

which is in tensorflow.python.keras.engine.training.py->Model class->def save()

In TF2.3 that then calls the save_model function in tensorflow.python.keras.saving.save.py
In TF2.11 that calls the save function in tensorflow.python.keras.saving.saved_model.save.py

which is odd, because the other function still exits and the new function isn't documented nearly as good as the old one is

In TF2.11 the error disappears when setting save_traces=False.
In TF2.3 the error is thrown no matter what.

I am not sure if this is a bug but it very much seems like one and I think it is connected to some other issues people are having, like this one https://github.com/tensorflow/model-optimization/issues/964 or this one https://github.com/tensorflow/tensorflow/issues/47554 

I don't know how to fix this, because I don't know why save.save_model would not point to tensorflow.python.keras.saving.save.py when the import is still "from tensorflow.python.keras.saving import save" in trainings.py. I just want someone to tell me if this is a bug or not.

Have a nice day,
Miriam


### Standalone code to reproduce the issue

```shell
import tensorflow as tf
from tensorflow.python.keras.models import Sequential
from tensorflow.python.keras.layers import LSTM, Dense, Dropout

model = Sequential([
    LSTM(128,input_shape=(4,5)),
    Dropout(0,2),
    Dense(1)
])

model.compile(loss='mae', optimizer='adam')
model.summary()

#model.save('testmodel', save_traces=False)
model.save('testmodel', save_traces=True)
```


### Relevant log output

```shell
Traceback (most recent call last):
  File "/home/miriam/vscode/UNIQORN/uniqorn/source/text.py", line 15, in <module>
    model.save('testmodel', save_traces=True)
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/keras/engine/training.py", line 2132, in save
    save.save_model(self, filepath, overwrite, include_optimizer, save_format,
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/keras/saving/save.py", line 149, in save_model
    saved_model_save.save(model, filepath, overwrite, include_optimizer,
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/keras/saving/saved_model/save.py", line 90, in save
    saved_nodes, node_paths = save_lib.save_and_return_nodes(
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/saved_model/save.py", line 1267, in save_and_return_nodes
    _build_meta_graph(obj, signatures, options, meta_graph_def))
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/saved_model/save.py", line 1440, in _build_meta_graph
    return _build_meta_graph_impl(obj, signatures, options, meta_graph_def)
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/saved_model/save.py", line 1383, in _build_meta_graph_impl
    signatures = signature_serialization.find_function_to_export(
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/saved_model/signature_serialization.py", line 103, in find_function_to_export
    for name, child in children:
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/saved_model/save.py", line 177, in list_children
    for name, child in super(_AugmentedGraphView, self).list_children(
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/checkpoint/graph_view.py", line 75, in list_children
    for name, ref in super(ObjectGraphView,
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/checkpoint/trackable_view.py", line 84, in children
    for name, ref in obj._trackable_children(save_type, **kwargs).items():
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/keras/engine/functional.py", line 370, in _trackable_children
    super(Functional, self)._trackable_children(save_type, **kwargs))
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/keras/engine/training.py", line 2746, in _trackable_children
    children = super(Model, self)._trackable_children(save_type, **kwargs)
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/keras/engine/base_layer.py", line 3047, in _trackable_children
    children = self._trackable_saved_model_saver.trackable_children(cache)
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/keras/saving/saved_model/base_serialization.py", line 55, in trackable_children
    children = self.objects_to_serialize(serialization_cache)
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/keras/saving/saved_model/layer_serialization.py", line 69, in objects_to_serialize
    return (self._get_serialized_attributes(
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/keras/saving/saved_model/layer_serialization.py", line 89, in _get_serialized_attributes
    object_dict, function_dict = self._get_serialized_attributes_internal(
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/keras/saving/saved_model/model_serialization.py", line 53, in _get_serialized_attributes_internal
    super(ModelSavedModelSaver, self)._get_serialized_attributes_internal(
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/keras/saving/saved_model/layer_serialization.py", line 99, in _get_serialized_attributes_internal
    functions = save_impl.wrap_layer_functions(self.obj, serialization_cache)
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/keras/saving/saved_model/save_impl.py", line 204, in wrap_layer_functions
    fn.get_concrete_function()
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/contextlib.py", line 120, in __exit__
    next(self.gen)
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/keras/saving/saved_model/save_impl.py", line 367, in tracing_scope
    fn.get_concrete_function(*args, **kwargs)
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/eager/polymorphic_function/polymorphic_function.py", line 1215, in get_concrete_function
    concrete = self._get_concrete_function_garbage_collected(*args, **kwargs)
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/eager/polymorphic_function/polymorphic_function.py", line 1206, in _get_concrete_function_garbage_collected
    concrete = self._variable_creation_fn._get_concrete_function_garbage_collected(  # pylint: disable=protected-access
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/eager/polymorphic_function/tracing_compiler.py", line 192, in _get_concrete_function_garbage_collected
    concrete_function, _ = self._maybe_define_concrete_function(args, kwargs)
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/eager/polymorphic_function/tracing_compiler.py", line 157, in _maybe_define_concrete_function
    return self._maybe_define_function(args, kwargs)
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/eager/polymorphic_function/tracing_compiler.py", line 360, in _maybe_define_function
    concrete_function = self._create_concrete_function(args, kwargs)
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/eager/polymorphic_function/tracing_compiler.py", line 284, in _create_concrete_function
    func_graph_module.func_graph_from_py_func(
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/framework/func_graph.py", line 1283, in func_graph_from_py_func
    func_outputs = python_func(*func_args, **func_kwargs)
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/eager/polymorphic_function/polymorphic_function.py", line 645, in wrapped_fn
    out = weak_wrapped_fn().__wrapped__(*args, **kwds)
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/keras/saving/saved_model/save_impl.py", line 599, in wrapper
    ret = method(*args, **kwargs)
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/keras/saving/saved_model/utils.py", line 165, in wrap_with_training_arg
    return control_flow_util.smart_cond(
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/keras/utils/control_flow_util.py", line 109, in smart_cond
    return smart_module.smart_cond(
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/framework/smart_cond.py", line 52, in smart_cond
    return true_fn()
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/keras/saving/saved_model/utils.py", line 166, in <lambda>
    training, lambda: replace_training_and_call(True),
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/keras/saving/saved_model/utils.py", line 163, in replace_training_and_call
    return wrapped_call(*args, **kwargs)
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/keras/saving/saved_model/save_impl.py", line 681, in call
    return call_and_return_conditional_losses(inputs, *args, **kwargs)[0]
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/keras/saving/saved_model/save_impl.py", line 639, in __call__
    return self.wrapped_call(*args, **kwargs)
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "/home/miriam/miniconda3/envs/tf/lib/python3.8/site-packages/tensorflow/python/keras/layers/core.py", line 207, in _get_noise_shape
    for i, value in enumerate(self.noise_shape):
TypeError: 'int' object is not iterable
```
</details>