def save_neuralnet (model, model_name):

    json_string = model.to_json()
    open(path + model_name + '_architecture.json', 'w').write(json_string)
    model.save_weights(path + model_name + '_weights.h5', overwrite=True)

    yaml_string = model.to_yaml()
    with open(path + model_name + '_data.yml', 'w') as outfile:
        outfile.write( yaml_string)