title: Is there a way to initialize a gpu memory fraction per process with a tensorflow model in SavedModel format without using session?
body: <p>I need to configure my tensorflow 2.0 SavedModel model to only use x percent of remaining available GPU memory without using session() object.</p>
  <p>I have found a way to do this but it involves the tensorflow session object which does not seem to be compatible with my SavedModel model.</p>
  <p>for example:</p>
  <pre><code># Load model
  model = tf.saved_model.load('path/to/model')
  
  # Apply GPU allocation kind of like this?
  config = tf.compat.v1.ConfigProto()
  config.gpu_options.per_process_gpu_memory_fraction = gpu_pct
  model.apply_config(config)
  
  # Gather detections
  model_fn = model.signatures['serving_default']
  output_dict = model_fn(input_tensor)
  </code></pre>