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)
def evaluate(): estimator = xdl.Estimator(model_fn=model_fn, optimizer=xdl.SGD(0.5)) estimator.evaluate(input_fn, checkpoint_version="", max_step=2000)
def predict(): estimator = xdl.Estimator(model_fn=model_fn, optimizer=xdl.SGD(0.5)) estimator.predict(input_fn, checkpoint_version="", max_step=2000)
def train(): estimator = xdl.Estimator(model_fn=model_fn, optimizer=xdl.SGD(0.5)) estimator.train(input_fn, max_step=2000, checkpoint_interval=1000)