In get_tensor_spec(): Use deepcopy to prevent the underlying spec from being modified.
In get_tensor_spec(): Use deepcopy to prevent the underlying spec from being modified.

PiperOrigin-RevId: 404820144

keras-team/keras,keras-team/keras