Skip to content

Instantly share code, notes, and snippets.

View gauravshelangia's full-sized avatar

Gaurav gauravshelangia

View GitHub Profile
@gauravshelangia
gauravshelangia / KerasOnAndroid.md
Created May 18, 2017 12:50
Running the keras neural network model on android mobile device

To run the keras model follow the below instructions

  • Save the keras model as json file and model weight in h5 file

    model.save('mtarget_model_full1.h5') 
    # save model in json file
    # serialize model to JSON
    model_json = model.to_json()
    with open("Model_json", "w") as json_file:
        json_file.write(model_json)