Load models through bytes (by memory)
@joseangel-mm,
TensorFlow doesn't have direct **load from bytes** api, but there is an alternative approach to achieve loading from byte-like objects

Could you please try saving and loading weights and then use the loaded weights from bytes like **model.load_weights(weights_bytes)** or saving and loading the Model (SavedModel format) and load the model from bytes as below

```
with io.BytesIO(bytes_data) as f:
    loaded_model = tf.keras.models.load_model(f)
```


Also try to load the savedModel from the buffer (TensorFlow Serving)
```
from tensorflow.saved_model import loader
bundle = loader.load(io.BytesIO(saved_model_bytes))
```

Thank you! > ng weights

Thanks @tilakrayal, it seems the second alternative would fit better for our case. @joseangel-mm,
Glad the suggestion worked for you to resolve the issue, Could you please feel free to move this to closed status. 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/62794">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/62794">No</a>

In my team, we wonder if it is possible to load the models directly by bytes. In the following example, I explain better:

Right now, we have in Golang the following to load the model:

`tf.LoadSavedModel(ModelPath, tags, nil)`
To do the previous step we use this [library](https://github.com/wamuir/graft).

What we want is to load the model directly from memory, something like the following:
`tf.LoadSavedModelFromMemory(ModelInbytes, tags, nil)`

We know we are using a binding for Golang which is the one that creates the API functions, but researching the TensorFlow code we discovered there is no alternative to it, so we wonder if there is any fork that does it, if so we could create or change the binding.

Thanks in advance.