class_docstr: Classifies a single document into up to N of N categories.
  
  Implemented via a sum of N sigmoid losses applied a linear projection of the base model's output representation.
  
  :param config: A :py:class:`finetune.config.Settings` object or None (for default config).
  :param \**kwargs: key-value pairs of config items to override.
class_docstr_tok: ["Classifies","a","single","document","into","up","to","N","of","N","categories",".","Implemented","via","a","sum","of","N","sigmoid","losses","applied","a","linear","projection","of","the","base","model","'s","output","representation",".",":","param","config",":","A",":","py",":","class",":","`","finetune.config.Settings","`","object","or","None","(","for","default","config",")",".",":","param","\\","*","*","kwargs",":","key-value","pairs","of","config","items","to","override","."]
code: def _predict(
      self, zipped_data, threshold=None, probas=False, **kwargs
  ):
      threshold = self._get_threshold(threshold)
      all_labels = []
      for (
          _,
          _,
          start_of_doc,
          end_of_doc,
          _,
          proba,
          _,
          _,
      ) in self.process_long_sequence(zipped_data, **kwargs):
          if start_of_doc:
              # if this is the first chunk in a document, start accumulating from scratch
              doc_probs = []
  
          doc_probs.append(proba)
  
          if end_of_doc:
              # last chunk in a document
              means = np.mean(doc_probs, axis=0)
              if probas:
                  all_labels.append(means)
              else:
                  label = self.input_pipeline.label_encoder.inverse_transform(
                      np.expand_dims(means, 0) > threshold
                  )[
                      0
                  ]
                  all_labels.append(list(label))
      return all_labels
  
imports: import tensorflow
  import numpy
  from finetune.base import BaseModel
  from finetune.encoding.target_encoders import MultilabelClassificationEncoder
  from finetune.nn.target_blocks import multi_classifier
  from finetune.util.imbalance import compute_class_weights
  from finetune.input_pipeline import BasePipeline
label_desc: Use image node_id 6 for calling the MultiLabelClassifier obj's underlying member method code with example usage: obj._predict(zipped_data, threshold, probas) and returns: all_labels