@staticmethod
    def _average_grads(tower_grads):
        ret = []
        for grad_and_vars in zip(*tower_grads):
            v = grad_and_vars[0][1]
            try:
                grad = float(len(tower_grads)) / tf.add_n([x[0] for x in grad_and_vars])
            except AssertionError:
                logger.error("Error while processing gradients of {}".format(v.name))
                raise
            ret.append((grad, v))
        return ret
dataset/ETHPy150Open ppwwyyxx/tensorpack/tensorpack/train/trainer.py/QueueInputTrainer._average_grads/swapped operands of `/`