pplonski / keras2cpp

This is a bunch of code to port Keras neural network model into pure C++.
MIT License
679 stars 153 forks source link

Dump model in binary file #7

Closed Tauranis closed 7 years ago

Tauranis commented 7 years ago

Hello, First of all I'd like to thank you for making this library. It has been very handy for me. However, I have a ~550MB Keras model(weigths) that turns into ~1.6GB plain text model to use with keras2cpp. Is it too much difficult to make the library be able to read a binary file? If I make it, I'll add a pull request. Thanks in advance.

pplonski commented 7 years ago

Hi! It is not hard to be able to read binary files - I just keep text files for debug purposes. It will be nice if we can support both: text files and binary files and read base on file extension? What do you think? In this area pull request is welcome.

Tauranis commented 7 years ago

Yeah. Sure

Just another thing. The current code does not give support for border_mode='same' on Convolution2D layers. I got an error and all my outputs were -nan =P. If I fix it, I'll make a pull resquest.

pplonski commented 7 years ago

I already fixed this, please check if it is working for you ;)