dotnet / dotnet/machinelearning

Load Tensorflow model from stream

Open
#5,486 1 comment 0 reactions 0 assignees View on GitHub
area-TensorFlow enhancement Priority:2
Dominant language
C#
Stars
9.4k
Forks
2k
Avg merge
2d 20h
Merged PRs (30d)
11

Description

### System information

- **OS version/distro**: Windows 10 Enterprise 64 bits
- **.NET Version (eg., dotnet --info)**: .NET Core 3.1

### Question

Is there a way to load a Tensorflow model from a memory stream instead of a filepath? Currently the only way I managed to load a TF model is by calling:
`public static TensorFlowModel LoadTensorFlowModel(this ModelOperationsCatalog catalog, string modelLocation);`

However, if I want to load a ML.NET trained model, I can do it by calling:
`public ITransformer Load(string filePath, out DataViewSchema inputSchema);`
or
`public ITransformer Load(Stream stream, out DataViewSchema inputSchema);`

I am looking for a method like the latter one but for TF models. Does anybody know if something like that is already implemented? How could I load a TF model without the need of having the .pb file in disk?
Will such a method be implemented in a future release?

Thanks for your help,
Carlos.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.