示例#1
0
def load_model():
    items = get_bucket_items()
    newest_item = max(map(int,items))
    model_weights = get_from_s3(str(newest_item))
    with open('./current.weights', 'w') as f:
        f.write(model_weights)
    model.load_weights("./current.weights")
示例#2
0
def load_model():
    items = get_bucket_items('kerasmodels')
    newest_item = max(map(int,items))
    model_weights = get_from_s3(str(newest_item), 'kerasmodels')
    print("loading model")
    with open('./current.weights', 'w') as f:
        f.write(model_weights)

    model.load_weights("./current.weights")