(gpu_str=None)
return config
generate a session config proto
generate a session config proto
generate a session config proto
def get_sess_config(gpu_str=None):
  """generate a session config proto"""
  config = tf.ConfigProto()

  # pylint: disable=no-member
  if gpu_str is None:
    config.gpu_options.visible_device_list = ''
  else:
    config.gpu_options.visible_device_list = gpu_str
    config.gpu_options.allow_growth = True
  return config
def get_sess_config ( gpu_str = None ) : config = tf . ConfigProto ( ) # pylint: disable=no-member if gpu_str is None : config . gpu_options . visible_device_list = '' else : config . gpu_options . visible_device_list = gpu_str config . gpu_options . allow_growth = True return config