class_docstr: Unified setup processes of all MatchZoo models.
  
  `config` is used to control specific behaviors. The default `config`
  will be updated accordingly if a `config` dictionary is passed. e.g. to
  override the default `bin_size`, pass `config={'bin_size': 15}`.
  
  See `tutorials/automation.ipynb` for a detailed walkthrough on usage.
  
  Default `config`:
  
  {
      # pair generator builder kwargs
      'num_dup': 1,
  
      # histogram unit of DRMM
      'bin_size': 30,
      'hist_mode': 'LCH',
  
      # dynamic Pooling of MatchPyramid
      'compress_ratio_left': 1.0,
      'compress_ratio_right': 1.0,
  
      # if no `matchzoo.Embedding` is passed to `tune`
      'embedding_output_dim': 50
  }
  
  :param task: Task.
  :param config: Configuration of specific behaviors.
  
  Example:
      >>> import matchzoo as mz
      >>> task = mz.tasks.Ranking(loss=mz.losses.RankCrossEntropyLoss())
      >>> preparer = mz.auto.Preparer(task)
      >>> model_class = mz.models.DenseBaseline
      >>> train_raw = mz.datasets.toy.load_data('train', 'ranking')
      >>> model, prpr, gen_builder, matrix = preparer.prepare(model_class,
      ...                                                     train_raw)
      >>> model.params.completed()
      True
class_docstr_tok: ["Unified","setup","processes","of","all","MatchZoo","models",".","`","config","`","is","used","to","control","specific","behaviors",".","The","default","`","config","`","will","be","updated","accordingly","if","a","`","config","`","dictionary","is","passed",".","e.g",".","to","override","the","default","`","bin_size","`",",","pass","`","config=","{","'bin_size","'",":","15","}","`",".","See","`","tutorials\/automation.ipynb","`","for","a","detailed","walkthrough","on","usage",".","Default","`","config","`",":","{","#","pair","generator","builder","kwargs","'num_dup","'",":","1",",","#","histogram","unit","of","DRMM","'bin_size","'",":","30",",","'hist_mode","'",":","'LCH","'",",","#","dynamic","Pooling","of","MatchPyramid","'compress_ratio_left","'",":","1.0",",","'compress_ratio_right","'",":","1.0",",","#","if","no","`","matchzoo.Embedding","`","is","passed","to","`","tune","`","'embedding_output_dim","'",":","50","}",":","param","task",":","Task",".",":","param","config",":","Configuration","of","specific","behaviors",".","Example",":",">",">",">","import","matchzoo","as","mz",">",">",">","task","=","mz.tasks.Ranking","(","loss=mz.losses.RankCrossEntropyLoss","(",")",")",">",">",">","preparer","=","mz.auto.Preparer","(","task",")",">",">",">","model_class","=","mz.models.DenseBaseline",">",">",">","train_raw","=","mz.datasets.toy.load_data","(","'train","'",",","'ranking","'",")",">",">",">","model",",","prpr",",","gen_builder",",","matrix","=","preparer.prepare","(","model_class",",","...","train_raw",")",">",">",">","model.params.completed","(",")","True"]
code: def _handle_drmm_input_shapes(self, model):
      if isinstance(model, mz.models.DRMM):
          left = model.params["input_shapes"][0]
          right = left + (self._config["bin_size"],)
          model.params["input_shapes"] = (left, right)
  
file_path: MatchZoo/matchzoo/auto/preparer/preparer.py
imports: import typing
  import numpy
  import matchzoo
  from matchzoo.engine.base_task import BaseTask
  from matchzoo.engine.base_model import BaseModel
  from matchzoo.engine.base_preprocessor import BasePreprocessor
  from matchzoo.data_generator import DataGeneratorBuilder
label_desc: Use image node_id 5 for calling the Preparer obj's underlying member method code with example usage: obj._handle_drmm_input_shapes(model) without return types