(self)
return xhat * self.gamma + self.beta
Initialize the fprop optree for batchnorm.
Initialize the fprop optree for batchnorm.
Initialize the fprop optree for batchnorm .
def get_forward_optree(self):
        """
        Initialize the fprop optree for batchnorm.
        """
        # get fprop op-tree
        xvar = self.be.var(self.x, axis=1)
        xmean = self.be.mean(self.x, axis=1)
        xhat = (self.x - xmean) / self.be.sqrt(xvar + self.eps)
        return xhat * self.gamma + self.beta
def get_forward_optree ( self ) : # get fprop op-tree xvar = self . be . var ( self . x , axis = 1 ) xmean = self . be . mean ( self . x , axis = 1 ) xhat = ( self . x - xmean ) / self . be . sqrt ( xvar + self . eps ) return xhat * self . gamma + self . beta