class_docstr: Negative sampling based skip-gram
class_docstr_tok: ["Negative","sampling","based","skip-gram"]
docstr: move all of the parameters to a single GPU
docstr_tok: ["move","all","of","the","parameters","to","a","single","GPU"]
code: def all_to_device(self, gpu_id):
      """move all of the parameters to a single GPU"""
      self.device = torch.device("cuda:%d" % gpu_id)
      self.set_device(gpu_id)
      if self.fst:
          self.fst_u_embeddings = self.fst_u_embeddings.cuda(gpu_id)
          self.fst_state_sum_u = self.fst_state_sum_u.to(self.device)
      if self.snd:
          self.snd_u_embeddings = self.snd_u_embeddings.cuda(gpu_id)
          self.snd_v_embeddings = self.snd_v_embeddings.cuda(gpu_id)
          self.snd_state_sum_u = self.snd_state_sum_u.to(self.device)
          self.snd_state_sum_v = self.snd_state_sum_v.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 6 for calling the SkipGramModel obj's underlying member method code with example usage: obj.all_to_device(gpu_id) without return types