Skip to content

Support 'tensorflow::MemmappedEnv' for memory mapped graphs #848

Closed
@feliwir

Description

@feliwir

Hey, i was trying to load the mozilla deepspeech model, which are usually provided as memory mapped graphs, see Mozilla DeepSpeech as an example:
https://github.com/mozilla/DeepSpeech/releases/tag/v0.9.3

They're loading the file in their native api like this:
https://stackoverflow.com/questions/43533264/how-to-read-tensorflow-memory-mapped-graph-file-in-android

However i couldn't find tensorflow::MemmappedEnv anywhere. How should i load such a model? My current code only works for non-memory mapped files (which i don't have for Mozilla DeepSpeech):

// This only works for regular non-mapped Graphs)
using (var codedInput = new CodedInputStream(File.OpenRead(modelPath)))
{
  var graphDef = new GraphDef();
  codedInput.ReadMessage(graphDef);
}

Thanks in advance!

Metadata

Metadata

Assignees

Labels

missing feature/sAn issue about missing features in the library.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions