(config)
return session_conf
Get the config for the tensorflow session.
Get the config for the tensorflow session.
Get the config for the tensorflow session .
def get_session_conf(config):
  """Get the config for the tensorflow session."""
  tfconf = config['solver']['run_config']
  session_conf = tf.ConfigProto(
      allow_soft_placement=tfconf['allow_soft_placement'],
      log_device_placement=tfconf['log_device_placement'],
      intra_op_parallelism_threads=tfconf['intra_op_parallelism_threads'],
      inter_op_parallelism_threads=tfconf['inter_op_parallelism_threads'],
      gpu_options=tf.GPUOptions(allow_growth=tfconf['allow_growth']))
  return session_conf
def get_session_conf ( config ) : tfconf = config [ 'solver' ] [ 'run_config' ] session_conf = tf . ConfigProto ( allow_soft_placement = tfconf [ 'allow_soft_placement' ] , log_device_placement = tfconf [ 'log_device_placement' ] , intra_op_parallelism_threads = tfconf [ 'intra_op_parallelism_threads' ] , inter_op_parallelism_threads = tfconf [ 'inter_op_parallelism_threads' ] , gpu_options = tf . GPUOptions ( allow_growth = tfconf [ 'allow_growth' ] ) ) return session_conf