def save_model_json(model, word_dim):
    """
    serialize model to json.
    # Arguments
        model : keras model.
        word_dim : w2v word length
    # Returns
        file_name : the model file name
    """
    model_json = model.to_json()

    with open("model_{}.json".format(word_dim), "w") as json_file:
        json_file.write(model_json)
    
    # serialize weights to HDF5
    model.save_weights("model_{}.h5".format(word_dim))
    print("Saved model to disk")
    
    file_name = 'model_{}'.format(word_dim)
    return file_name