We can add a command line option to adjust the CPU usage, so that the program won't use up all of the resources. In addition, one can compare the timing of different settings.
parser.add_argument('--num_threads', dest='num_threads', type=int, default=0)
sess_config.inter_op_parallelism_threads = args.num_threads
sess_config.intra_op_parallelism_threads = args.num_threads