Args: all_packed: K lists of packed gradients.
(self, all_packed, devices)
| 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 |