Example #1
0
def train_and_evaluate():
    estimator = xdl.Estimator(model_fn=model_fn, optimizer=xdl.SGD(0.5))

    estimator.train_and_evaluate(train_input_fn=input_fn,
                                 eval_input_fn=eval_input_fn,
                                 eval_interval=1000,
                                 eval_steps=200,
                                 checkpoint_interval=1000,
                                 max_step=5000)
Example #2
0
def evaluate():
    estimator = xdl.Estimator(model_fn=model_fn, optimizer=xdl.SGD(0.5))
    estimator.evaluate(input_fn, checkpoint_version="", max_step=2000)
Example #3
0
def predict():
    estimator = xdl.Estimator(model_fn=model_fn, optimizer=xdl.SGD(0.5))
    estimator.predict(input_fn, checkpoint_version="", max_step=2000)
Example #4
0
def train():
    estimator = xdl.Estimator(model_fn=model_fn, optimizer=xdl.SGD(0.5))
    estimator.train(input_fn, max_step=2000, checkpoint_interval=1000)