Unverified Commit 62f1d732 authored by Karmel Allison's avatar Karmel Allison Committed by GitHub
Browse files

Revert "Support to set inter_op_parallelism_threads and...

Revert "Support to set inter_op_parallelism_threads and intra_op_parallelism_threads for ResNet (#3502)" (#3518)

This reverts commit ce445976.
parent c7df5a3d
...@@ -584,15 +584,8 @@ def resnet_main(flags, model_function, input_function): ...@@ -584,15 +584,8 @@ def resnet_main(flags, model_function, input_function):
model_function, model_function,
loss_reduction=tf.losses.Reduction.MEAN) loss_reduction=tf.losses.Reduction.MEAN)
# Create session config based on values of inter_op_parallelism_threads and # Set up a RunConfig to only save checkpoints once per training cycle.
# intra_op_parallelism_threads. run_config = tf.estimator.RunConfig().replace(save_checkpoints_secs=1e9)
session_config = tf.ConfigProto(
inter_op_parallelism_threads=flags.inter_op_parallelism_threads,
intra_op_parallelism_threads=flags.intra_op_parallelism_threads)
# Set up a RunConfig to save checkpoint and set session config.
run_config = tf.estimator.RunConfig().replace(save_checkpoints_secs=1e9,
session_config=session_config)
classifier = tf.estimator.Estimator( classifier = tf.estimator.Estimator(
model_fn=model_function, model_dir=flags.model_dir, config=run_config, model_fn=model_function, model_dir=flags.model_dir, config=run_config,
params={ params={
...@@ -682,13 +675,3 @@ class ResnetArgParser(argparse.ArgumentParser): ...@@ -682,13 +675,3 @@ class ResnetArgParser(argparse.ArgumentParser):
'--multi_gpu', action='store_true', '--multi_gpu', action='store_true',
help='If set, run across all available GPUs. Note that this is ' help='If set, run across all available GPUs. Note that this is '
'superseded by the --num_gpus flag.') 'superseded by the --num_gpus flag.')
self.add_argument(
'--inter_op_parallelism_threads', type=int, default=0,
help='Number of inter_op_parallelism_threads to use for CPU. '
'See TensorFlow config.proto for details.')
self.add_argument(
'--intra_op_parallelism_threads', type=int, default=0,
help='Number of intra_op_parallelism_threads to use for CPU. '
'See TensorFlow config.proto for details.')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment