-
Notifications
You must be signed in to change notification settings - Fork 4
Description
This is a fantastic library - I've been testing it out and great to have native java implementation which works with existing software. However I've come across an issue I can't seem to resolve. I am unable to extract any of the metadata associated with a pre-trained model?
When saving a trained model, extra information can be added in Python or C++ using an ExtraFilesMap object. In this case the extra info is the type of audio data the model was trained on; this is vital for pre-conditioning audio data before it's passed to a model for classification. In Python this extra metadata can be extracted from a saved model via...
extra_files = torch._C.ExtraFilesMap()
model = torch.jit.load(filepath_model, _extra_files=extra_files)
dataOptsStr = extra_files['dataOpts']
In Java a trained model can be loaded using...
Module mod = Module.load(modelPath);
However, there does not appear to be any method to extract the ExtraFileMap information. I've spent a long time trying to find a solution with no luck. Am missing something here? It seems like important functionality for sharing models between different languages etc.?
Thanks for the help.