class_docstr: Transform labels to encodings.
  
  # Arguments
      labels: A list of labels of any type. The labels to be encoded.
class_docstr_tok: ["Transform","labels","to","encodings",".","#","Arguments","labels",":","A","list","of","labels","of","any","type",".","The","labels","to","be","encoded","."]
code: def __init__(self, labels, **kwargs):
      super().__init__(**kwargs)
      self.labels = [
          label.decode("utf-8")
          if isinstance(label, bytes)
          else str(label)
          for label in labels
      ]
  
file_path: autokeras/autokeras/preprocessors/encoders.py
imports: import numpy
  import tensorflow
  from autokeras.engine import preprocessor
label_desc: Use image node_id 1 to create a new Encoder object from inherited base classes: preprocessor with example: obj = Encoder(labels)