def __init__(self, model):
        avg_updates = OrderedDict()
        t = sharedX(1.)
        self.param_to_mean = OrderedDict()
        for param in model.get_params():
            mean = sharedX(param.get_value())
            assert type(mean) == type(param)
            self.param_to_mean[param] = mean
            avg_updates[mean] = mean - (param - mean) / t
            avg_updates[t] = t + 1.
        self.avg = function([], updates = avg_updates)
dataset/ETHPy150Open goodfeli/adversarial/sgd.py/_PolyakWorker.__init__/swapped operands of `-`