class_docstr: ```
  predicts image classes
  ```
class_docstr_tok: ["``","`","predicts","image","classes","``","`"]
code: def predict_generator(
      self, generator, steps=None, return_proba=False, verbose=0
  ):
      # loss = self.model.loss
      # if callable(loss): loss = loss.__name__
      # treat_multilabel = False
      # if loss != 'categorical_crossentropy' and not return_proba:
      #    return_proba=True
      #    treat_multilabel = True
      classification, multilabel = U.is_classifier(self.model)
      if not classification:
          return_proba = True
      # *_generator methods are deprecated from TF 2.1.0
      # preds =  self.model.predict_generator(generator, steps=steps)
      preds = self.model.predict(
          generator, steps=steps, verbose=verbose
      )
      result = (
          preds
          if return_proba or multilabel
          else [self.c[np.argmax(pred)] for pred in preds]
      )
      if multilabel and not return_proba:
          return [list(zip(self.c, r)) for r in result]
      if not classification:
          return np.squeeze(result, axis=1)
      else:
          return result
  
file_path: ktrain/ktrain/vision/predictor.py
imports: from ..None import utils
  from ..imports import *
  from ..predictor import Predictor
  from .preprocessor import ImagePreprocessor
label_desc: Use image node_id 7 for calling the ImagePredictor obj's underlying member method code with example usage: obj.predict_generator(generator, steps, return_proba, verbose) and returns: unknown, np, result