          if self.logger:
              self.logger.debug("GPU VRAM free: %s", vram)
          return vram
  
      def get_card_most_free(self, supports_plaidml=True):
          """ Return the card and available VRAM for active card with
              most VRAM free """
          if self.device_count == 0 or (self.is_plaidml and not supports_plaidml):
              return {"card_id": -1,
                      "device": "No Nvidia devices found",
                      "free": 2048,
                      "total": 2048}
          free_vram = [self.get_free()[i] for i in self.active_devices]
 
</s> remove                     "device": "No Nvidia devices found",
 </s> add                     "device": "No GPU devices found", </s> remove                     for handle in self.handles]
        self.shutdown()
        if self.logger:
            self.logger.debug("GPU VRAM free: %s", vram)
 </s> add                     for handle in self._handles]
        self._shutdown()
        self._log("debug", "GPU VRAM free: {}".format(vram)) </s> remove         free_vram = [self.get_free()[i] for i in self.active_devices]
 </s> add         free_vram = [self._get_free_vram()[i] for i in self._active_devices] </s> remove                   "device": self.devices[card_id],
 </s> add                   "device": self._devices[card_id], </s> remove         card_id = self.active_devices[free_vram.index(vram_free)]
 </s> add         card_id = self._active_devices[free_vram.index(vram_free)]
    def get_card_most_free(self):
        """ Obtain statistics for the GPU with the most available free VRAM.

        Returns
        -------
        dict
            The dictionary contains the following data:

                **card_id** (`int`):  The index of the card as pertaining to :attr:`_handles`

                **device** (`str`): The name of the device

                **free** (`float`): The amount of available VRAM on the GPU

                **total** (`float`): the total amount of VRAM on the GPU

            If a GPU is not detected then the **card_id** is returned as ``-1`` and the amount
            of free and total RAM available is fixed to 2048 Megabytes.
        """
        if self._device_count == 0:
          if self.logger:
              self.logger.debug("GPU VRAM free: %s", vram)
          return vram
  
    def get_card_most_free(self):
        """ Obtain statistics for the GPU with the most available free VRAM.

        Returns
        -------
        dict
            The dictionary contains the following data:

                **card_id** (`int`):  The index of the card as pertaining to :attr:`_handles`

                **device** (`str`): The name of the device

                **free** (`float`): The amount of available VRAM on the GPU

                **total** (`float`): the total amount of VRAM on the GPU

            If a GPU is not detected then the **card_id** is returned as ``-1`` and the amount
            of free and total RAM available is fixed to 2048 Megabytes.
        """
        if self._device_count == 0:
    def get_card_most_free(self):
        """ Obtain statistics for the GPU with the most available free VRAM.

        Returns
        -------
        dict
            The dictionary contains the following data:

                **card_id** (`int`):  The index of the card as pertaining to :attr:`_handles`

                **device** (`str`): The name of the device

                **free** (`float`): The amount of available VRAM on the GPU

                **total** (`float`): the total amount of VRAM on the GPU

            If a GPU is not detected then the **card_id** is returned as ``-1`` and the amount
            of free and total RAM available is fixed to 2048 Megabytes.
        """
        if self._device_count == 0:
    def get_card_most_free(self):
        """ Obtain statistics for the GPU with the most available free VRAM.

        Returns
        -------
        dict
            The dictionary contains the following data:

                **card_id** (`int`):  The index of the card as pertaining to :attr:`_handles`

                **device** (`str`): The name of the device

                **free** (`float`): The amount of available VRAM on the GPU

                **total** (`float`): the total amount of VRAM on the GPU

            If a GPU is not detected then the **card_id** is returned as ``-1`` and the amount
            of free and total RAM available is fixed to 2048 Megabytes.
        """
        if self._device_count == 0:
    def get_card_most_free(self):
        """ Obtain statistics for the GPU with the most available free VRAM.

        Returns
        -------
        dict
            The dictionary contains the following data:

                **card_id** (`int`):  The index of the card as pertaining to :attr:`_handles`

                **device** (`str`): The name of the device

                **free** (`float`): The amount of available VRAM on the GPU

                **total** (`float`): the total amount of VRAM on the GPU

            If a GPU is not detected then the **card_id** is returned as ``-1`` and the amount
            of free and total RAM available is fixed to 2048 Megabytes.
        """
        if self._device_count == 0:
              return {"card_id": -1,
                      "device": "No Nvidia devices found",
                      "free": 2048,
                      "total": 2048}
          free_vram = [self.get_free()[i] for i in self.active_devices]
keep keep keep keep replace replace replace replace keep keep keep keep keep
 Core Updates (#1015)

- Remove lib.utils.keras_backend_quiet and replace with get_backend() where relevant
- Document lib.gpu_stats and lib.sys_info
- Remove call to GPUStats.is_plaidml from convert and replace with get_backend()
- lib.gui.menu - typofix 
lib/gpu_stats.py