class_docstr: Suppresses GPU usage within TensorFlow if the Turi Create configuration has
  requested no GPUs to be used. Can also be used as a context manager.
class_docstr_tok: ["Suppresses","GPU","usage","within","TensorFlow","if","the","Turi","Create","configuration","has","requested","no","GPUs","to","be","used",".","Can","also","be","used","as","a","context","manager","."]
code: def start(self):
      import turicreate as tc
  
      self.force_cpu = tc.config.get_num_gpus() == 0
      if self.force_cpu:
          # Setting the environment variable CUDA_VISIBLE_DEVICES appears to
          # be the most reliable way to suppress GPU usage. Set that, but
          # first save the old value so we can restore it when we're done.
          import os
  
          if "CUDA_VISIBLE_DEVICES" in os.environ:
              self.cuda_visible_devices = os.environ[
                  "CUDA_VISIBLE_DEVICES"
              ]
          else:
              self.cuda_visible_devices = None
          os.environ["CUDA_VISIBLE_DEVICES"] = ""
  
file_path: turicreate/src/python/turicreate/toolkits/_tf_utils.py
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import numpy
  from turicreate._deps.minimal_package import _minimal_package_import_check
label_desc: Use image node_id 1 for calling the TensorFlowGPUPolicy obj's underlying member method code with example usage: obj.start() without return types