MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / unpack_all

Method unpack_all

tensorpack/graph_builder/utils.py:457–466  ·  view source on GitHub ↗

Args: all_packed: K lists of packed gradients.

(self, all_packed, devices)

Source from the content-addressed store, hash-verified

455 return ret
456
457 def unpack_all(self, all_packed, devices):
458 """
459 Args:
460 all_packed: K lists of packed gradients.
461 """
462 all_grads = [] # #GPU x #Var
463 for dev, packed_grads_single_device in zip(devices, all_packed):
464 with tf.device(dev):
465 all_grads.append(self.unpack(packed_grads_single_device))
466 return all_grads

Callers 1

buildMethod · 0.95

Calls 3

unpackMethod · 0.95
deviceMethod · 0.80
appendMethod · 0.80

Tested by

no test coverage detected