  
      def initialize(self):
          """ Initialize pynvml """
          if not self.initialized:
              if IS_MACOS:
                  if self.logger:
                      self.logger.debug("macOS Detected. Using pynvx")
                  try:
                      pynvx.cudaInit()
                  except RuntimeError:
 
</s> remove     def initialize(self):
 </s> add     def initialize(self, log=False): </s> remove             if not IS_MACOS:
 </s> add             if not IS_MACOS and not self.plaid: </s> remove         if IS_MACOS:
 </s> add         if self.plaid is not None:
            self.device_count = self.plaid.device_count
        elif IS_MACOS: </s> remove         if IS_MACOS:
 </s> add         if self.plaid is not None:
            driver = self.plaid.drivers
        elif IS_MACOS: </s> remove         if IS_MACOS:
 </s> add         if self.plaid is not None:
            self.handles = self.plaid.devices
        elif IS_MACOS:
            if K.backend() == "plaidml.keras.backend":
                if self.logger:
                    self.logger.debug("plaidML Detected. Using plaidMLStats")
                self.plaid = plaidlib(log=log)
            elif IS_MACOS:
  
      def initialize(self):
          """ Initialize pynvml """
          if not self.initialized:
            if K.backend() == "plaidml.keras.backend":
                if self.logger:
                    self.logger.debug("plaidML Detected. Using plaidMLStats")
                self.plaid = plaidlib(log=log)
            elif IS_MACOS:
                  if self.logger:
                      self.logger.debug("macOS Detected. Using pynvx")
                  try:
                      pynvx.cudaInit()
                  except RuntimeError:
keep keep keep keep replace keep keep keep keep keep
 Experimental AMD Support (#764)

* PlaidML support in setup.py

* Add AMD flag for plaidml support

* PlaidML - Use .plaidML file if present, otherwise default to largest available

* Update training info message for GUI

* Add AMD option to Windows Installer

* Add quiet keras.backend importer and minor sysinfo amend.

* plug PlaidMLStats into GPUStats

* Update Docs 
lib/gpu_stats.py