def define_census_flags(): wide_deep_run_loop.define_wide_deep_flags() flags.adopt_module_key_flags(wide_deep_run_loop) flags_core.set_defaults(data_dir='/tmp/census_data', model_dir='/tmp/census_model', train_epochs=40, epochs_between_evals=2, batch_size=40)
def define_census_flags(): wide_deep_run_loop.define_wide_deep_flags() flags.adopt_module_key_flags(wide_deep_run_loop) flags_core.set_defaults(data_dir='/tmp/census_data', model_dir='/tmp/census_model', train_epochs=40, epochs_between_evals=2, batch_size=40)
def define_census_flags(): wide_deep_run_loop.define_wide_deep_flags() flags.adopt_module_key_flags(wide_deep_run_loop) flags_core.set_defaults(data_dir='/tmp/census_data', model_dir='/tmp/census_model', train_epochs=2, epochs_between_evals=2, inter_op_parallelism_threads=0, intra_op_parallelism_threads=0, batch_size=40)
def define_uv_flags(): wide_deep_run_loop.define_wide_deep_flags() flags.adopt_module_key_flags(wide_deep_run_loop) flags_core.set_defaults(data_dir='uv_dataset', model_dir='uv_model', train_epochs=1, epochs_between_evals=1, inter_op_parallelism_threads=0, intra_op_parallelism_threads=0, batch_size=500)
def define_movie_flags(): """Define flags for movie dataset training.""" wide_deep_run_loop.define_wide_deep_flags() flags.DEFINE_enum( name="dataset", default=movielens.ML_1M, enum_values=movielens.DATASETS, case_sensitive=False, help=flags_core.help_wrap("Dataset to be trained and evaluated.")) flags.adopt_module_key_flags(wide_deep_run_loop) flags_core.set_defaults(data_dir="/tmp/movielens-data/", model_dir='/tmp/movie_model', model_type="deep", train_epochs=30, epochs_between_evals=5, batch_size=256) @flags.validator("stop_threshold", message="stop_threshold not supported for movielens model") def _no_stop(stop_threshold): return stop_threshold is None
def define_movie_flags(): """Define flags for movie dataset training.""" wide_deep_run_loop.define_wide_deep_flags() flags.DEFINE_enum( name="dataset", default=movielens.ML_1M, enum_values=movielens.DATASETS, case_sensitive=False, help=flags_core.help_wrap("Dataset to be trained and evaluated.")) flags.adopt_module_key_flags(wide_deep_run_loop) flags_core.set_defaults(data_dir="/tmp/movielens-data/", model_dir='/tmp/movie_model', model_type="deep", train_epochs=50, epochs_between_evals=5, batch_size=256) @flags.validator("stop_threshold", message="stop_threshold not supported for movielens model") def _no_stop(stop_threshold): return stop_threshold is None