sony / nnabla

Neural Network Libraries
https://nnabla.org/
Apache License 2.0
2.73k stars 334 forks source link

Allow to set the parameter file format #1242

Closed TomonobuTsujikawa closed 11 months ago

TomonobuTsujikawa commented 11 months ago

The parameters in the nnp file are stored in h5 format by default. This PR tends to add an option to allow include a .protobuf file in nnp file.

Here is the example:

# These are stored by h5 format:
save('model.nnp', contents=contents)
save('model.nnp', contents=contents, parameter_format='.h5')

# This is stored by protobuf format:
save('model.nnp', contents=contents, parameter_format='.protobuf')