class_docstr: Accelerator is an abstraction for the hardware device that is used to run the model.
  
  Args:
      device (str): The device to be used. Currently only support 'cpu' and 'gpu'.
class_docstr_tok: ["Accelerator","is","an","abstraction","for","the","hardware","device","that","is","used","to","run","the","model",".","Args",":","device","(","str",")",":","The","device","to","be","used",".","Currently","only","support","'cpu","'","and","'gpu","'","."]
code: def __init__(self, device: str):
      self.device = device
  
      assert (
          self.device in _supported_devices
      ), f"Device {self.device} is not supported yet, supported devices include {_supported_devices}"
  
imports: import torch
  import torch.nn
label_desc: Use image node_id 1 to create a new Accelerator object  with example: obj = Accelerator(device)