How to use the technical.MultiGPU-HPC-TensorFlow-ybisk.parity.Model function in technical

To help you get started, we’ve selected a few technical examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github isi-nlp / tutorials / technical / MultiGPU-HPC-TensorFlow-ybisk / parity.py View on Github external
inp = []
      tar = []
      for gpu in self.gpu_list:
        i,t = get_batch()
        inp.append(i)
        tar.append(t)
      feed_dict = {self.inputs: inp, self.targets: tar}
      cost_summary, _, cost = self.sess.run([self.train_cost_summary, self.train_op, self.cost], feed_dict)
      self.writer.add_summary(cost_summary, step)
      if step%100 == 0:
        print step,"\t",cost


start = datetime.datetime.now()
print start
model = Model(gpu_list, max_length)
model.train()
end = datetime.datetime.now()
print "Total time: ", end - start