class_docstr: Classification task.
  
  Examples:
      >>> classification_task = Classification(num_classes=2)
      >>> classification_task.metrics = ['precision']
      >>> classification_task.num_classes
      2
      >>> classification_task.output_shape
      (2,)
      >>> classification_task.output_dtype
      <class 'int'>
      >>> print(classification_task)
      Classification Task with 2 classes
docstr: Classification task.
docstr_tok: ["Classification","task","."]
code: def __init__(self, num_classes: int = 2, **kwargs):
      """Classification task."""
      super().__init__(**kwargs)
      if not isinstance(num_classes, int):
          raise TypeError("Number of classes must be an integer.")
      if num_classes < 2:
          raise ValueError("Number of classes can't be smaller than 2")
      self._num_classes = num_classes
  
file_path: MatchZoo/matchzoo/tasks/classification.py
imports: from matchzoo.engine.base_task import BaseTask
label_desc: Use image node_id 1 to create a new Classification object from inherited base classes: BaseTask with example: obj = Classification(num_classes)