class_docstr: A wrapper for predictor functions that automatically adapts batch size.
  
  Predictor functions are functions that take batched model inputs and return
  batched model outputs. RobustPredictor partitions the batch in response to
  ResourceExhaustedErrors, making multiple calls to the wrapped predictor to
  process the entire batch.
class_docstr_tok: ["A","wrapper","for","predictor","functions","that","automatically","adapts","batch","size",".","Predictor","functions","are","functions","that","take","batched","model","inputs","and","return","batched","model","outputs",".","RobustPredictor","partitions","the","batch","in","response","to","ResourceExhaustedErrors",",","making","multiple","calls","to","the","wrapped","predictor","to","process","the","entire","batch","."]
docstr: Initialize a RobustPredictor instance.
docstr_tok: ["Initialize","a","RobustPredictor","instance","."]
code: def __init__(self, predictor):
      """Initialize a RobustPredictor instance."""
      self.predictor = predictor
      self.maxsize = None
  
file_path: magenta/magenta/models/coconet/lib_tfutil.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 1 to create a new RobustPredictor object from inherited base classes: object with example: obj = RobustPredictor(predictor)