rindow / rindow-neuralnetworks

Neural networks library for machine learning on PHP
https://rindow.github.io/neuralnetworks
BSD 3-Clause "New" or "Revised" License
78 stars 10 forks source link

Loading different model formats #5

Open Kali-Zoidberg opened 10 months ago

Kali-Zoidberg commented 10 months ago

I'm not too familiar with the model loading process but is it possible to use this library to load in different model formats (like h5) other than the provided .model extension?

P.S. amazing work on this project. It's been an incredibly useful tool for my organization.

yuichiis commented 10 months ago

Thank you for finding this project.

As you mentioned, the only model save format is currently ".model".

The h5 you are referring to is probably the model save format used by TensorFlow.

However, this save format only writes out the internal model structure of TensorFlow in a binary file format called HDF5.

Therefore, it cannot be read by machine learning frameworks other than TensorFlow.

For example, TensorFlow models cannot be read by PyTorch. Our framework cannot do it either.

There are projects such as NNEF and ONNX to solve this problem, but I think they have not yet reached a practical state.

It is very difficult to reuse models saved between different frameworks.

I hope our project will be helpful to you.