class tf.contrib.learn.RunConfigSee the guide: Learn (contrib) > Graph actions
This class specifies the configurations for an Estimator run.
If you're a Google-internal user using command line flags with learn_runner.py (for instance, to do distributed training or to use parameter servers), you probably want to use learn_runner.EstimatorConfig instead.
cluster_specenvironmentevaluation_masteris_chiefkeep_checkpoint_every_n_hourskeep_checkpoint_maxmasternum_ps_replicassave_checkpoints_secssave_checkpoints_stepssave_summary_stepstask_idtask_typetf_configtf_random_seed__init__(master=None, num_cores=0, log_device_placement=False, gpu_memory_fraction=1, tf_random_seed=None, save_summary_steps=100, save_checkpoints_secs=600, save_checkpoints_steps=None, keep_checkpoint_max=5, keep_checkpoint_every_n_hours=10000, evaluation_master='')Constructor.
Note that the superclass ClusterConfig may set properties like cluster_spec, is_chief, master (if None in the args), num_ps_replicas, task_id, and task_type based on the TF_CONFIG environment variable. See ClusterConfig for more details.
master: TensorFlow master. Defaults to empty string for local.num_cores: Number of cores to be used. If 0, the system picks an appropriate number (default: 0).log_device_placement: Log the op placement to devices (default: False).gpu_memory_fraction: Fraction of GPU memory used by the process on each GPU uniformly on the same machine.tf_random_seed: Random seed for TensorFlow initializers. Setting this value allows consistency between reruns.save_summary_steps: Save summaries every this many steps.save_checkpoints_secs: Save checkpoints every this many seconds. Can not be specified with save_checkpoints_steps.save_checkpoints_steps: Save checkpoints every this many steps. Can not be specified with save_checkpoints_secs.keep_checkpoint_max: The maximum number of recent checkpoint files to keep. As new files are created, older files are deleted. If None or 0, all checkpoint files are kept. Defaults to 5 (that is, the 5 most recent checkpoint files are kept.)keep_checkpoint_every_n_hours: Number of hours between each checkpoint to be saved. The default value of 10,000 hours effectively disables the feature.evaluation_master: the master on which to perform evaluation.get_task_id()Returns task index from TF_CONFIG environmental variable.
If you have a ClusterConfig instance, you can just access its task_id property instead of calling this function and re-parsing the environmental variable.
TF_CONFIG['task']['index']. Defaults to 0.
Defined in tensorflow/contrib/learn/python/learn/estimators/run_config.py.
© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/contrib/learn/RunConfig