(self, fprop_in, scale_weights=0)
return self.fprop_out
Batch normalization forward pass. Uses a compound kernel call.
Batch normalization forward pass. Uses a compound kernel call.
Batch normalization forward pass . Uses a compound kernel call .
def fprop(self, fprop_in, scale_weights=0):
        """
        Batch normalization forward pass. Uses a compound kernel call.
        """
        if type(fprop_in) is tuple:
            fprop_in, bsum = fprop_in
        else:
            bsum = None

        if self.fprop_in is None:
            self.fprop_in = fprop_in.reshape(self.dim2)

        if bsum is None:
            self.xsum[:] = self.lib.sum(self.fprop_in, axis=1)
        else:
            self.xsum = bsum

        self.lib.compound_fprop_bn(
            self.fprop_in, self.xsum, self.xvar, self.gmean, self.gvar,
            self.gamma, self.beta, self.fprop_out, self.eps, self.rho, self.relu)

        return self.fprop_out
def fprop ( self , fprop_in , scale_weights = 0 ) : if type ( fprop_in ) is tuple : fprop_in , bsum = fprop_in else : bsum = None if self . fprop_in is None : self . fprop_in = fprop_in . reshape ( self . dim2 ) if bsum is None : self . xsum [ : ] = self . lib . sum ( self . fprop_in , axis = 1 ) else : self . xsum = bsum self . lib . compound_fprop_bn ( self . fprop_in , self . xsum , self . xvar , self . gmean , self . gvar , self . gamma , self . beta , self . fprop_out , self . eps , self . rho , self . relu ) return self . fprop_out