class_docstr: Class implementing OneHotEncoder operators for ints in PyTorch.
code: def __init__(self, logical_operator, categories, device):
      super(OneHotEncoder, self).__init__(
          logical_operator, transformer=True
      )
  
      self.num_columns = len(categories)
  
      condition_tensors = []
      for arr in categories:
          condition_tensors.append(
              torch.nn.Parameter(
                  torch.LongTensor(arr).detach().clone(),
                  requires_grad=False,
              )
          )
      self.condition_tensors = torch.nn.ParameterList(condition_tensors)
  
file_path: hummingbird/hummingbird/ml/operator_converters/_one_hot_encoder_implementations.py
imports: import numpy
  import torch
  from ._physical_operator import PhysicalOperator
  from .None import constants
label_desc: Use image node_id 1 to create a new OneHotEncoder object from inherited base classes: PhysicalOperator, torch.nn with example: obj = OneHotEncoder(logical_operator, categories, device)