def METHOD_NAME(output_dir):
    wide, deep = get_wide_deep(N_EMBEDS)
    run_config = tf.estimator.RunConfig(save_checkpoints_secs=EVAL_INTERVAL,
                                        keep_checkpoint_max=3)
    hidden_units = [max(int(FIRST_LAYER_SIZE / (pow(2, i))), 2)
                    for i in range(NUM_LAYERS)]
    optimizer = tf.train.AdagradOptimizer(LEARNING_RATE)
    estimator = tf.estimator.DNNLinearCombinedRegressor(
        model_dir=output_dir,
        linear_feature_columns=wide,
        dnn_feature_columns=deep,
        dnn_hidden_units=hidden_units,
        dnn_dropout=DROPOUT_RATE,
        dnn_optimizer=optimizer,
        config=run_config)
    hook = LambdaProfilerHook(
        steps_lambda=lambda step: step in [10000, 10001, 10002],
        output_dir=output_dir,
        show_memory=True)
    train_spec = tf.estimator.TrainSpec(
        input_fn=read_dataset(tf.estimator.ModeKeys.TRAIN),
        max_steps=TRAIN_STEPS,
        hooks=[hook])
    exporter = tf.estimator.LatestExporter('exporter', serving_input_fn)
    estimator = tf.contrib.estimator.add_metrics(estimator, my_rmse)
    estimator = tf.contrib.estimator.forward_features(estimator, KEY_COLUMN)
    eval_spec = tf.estimator.EvalSpec(
        input_fn=read_dataset(tf.estimator.ModeKeys.EVAL),
        steps=None,
        start_delay_secs=60,
        throttle_secs=EVAL_INTERVAL,
        exporters=exporter)
    tf.estimator.METHOD_NAME(estimator, train_spec, eval_spec)