class_docstr: Negative sampling based skip-gram
class_docstr_tok: ["Negative","sampling","based","skip-gram"]
docstr: set gpu device
docstr_tok: ["set","gpu","device"]
code: def set_device(self, gpu_id):
      """set gpu device"""
      self.device = torch.device("cuda:%d" % gpu_id)
      print("The device is", self.device)
      self.lookup_table = self.lookup_table.to(self.device)
      if self.record_loss:
          self.logsigmoid_table = self.logsigmoid_table.to(self.device)
      self.index_emb_negu = self.index_emb_negu.to(self.device)
      self.index_emb_negv = self.index_emb_negv.to(self.device)
  
imports: import random
  import numpy
  import torch
  import torch.multiprocessing
  import torch.nn
  import torch.nn.functional
  from torch.multiprocessing import Queue
  from torch.nn import init
label_desc: Use image node_id 5 for calling the SkipGramModel obj's underlying member method code with example usage: obj.set_device(gpu_id) without return types