def fit_and_predict(with_distribution=None):
    model.set_weights(initial_weights)
    model.compile(loss=keras.losses.mean_squared_error, optimizer=gradient_descent.GradientDescentOptimizer(0.5), distribute=with_distribution)
    (training_inputs, eval_inputs, predict_inputs) = get_correctness_test_inputs(use_numpy, with_distribution, x_train, y_train, x_predict)
    model.fit(**training_inputs)
    eval_result = model.evaluate(**eval_inputs)
    weights = model.get_weights()
    predict_result = model.predict(**predict_inputs)
    return (weights, eval_result, predict_result)
def fit_and_predict(with_distribution=None):
    model.set_weights(initial_weights)
    model.compile(loss=keras.losses.mean_squared_error, optimizer=gradient_descent.GradientDescentOptimizer(0.5), distribute=with_distribution)
    (training_inputs, eval_inputs, predict_inputs) = get_correctness_test_inputs(use_numpy, with_distribution, x_train, y_train, x_predict)
    model.fit(**training_inputs)
    eval_result = model.evaluate(**eval_inputs)
    weights = model.get_weights()
    predict_result = model.predict(**predict_inputs)
    return (weights, eval_result, predict_result)