Beispiel #1
0
 def _bprop(self,dZ):
     if dZ is None:
        return (None,0)
     db = sm.sum(dZ,axis=0)
     if self.negdecay:
         db += self.negdecay
     if self.start_training > globals.flags.get("step",0):
         db *= 0
     return (dZ,db)     # (dX,db)
Beispiel #2
0
 def _bprop(self, dZ):
     if dZ is None:
         return (None, 0)
     db = sm.sum(dZ, axis=0)
     if self.negdecay:
         db += self.negdecay
     if self.start_training > globals.flags.get("step", 0):
         db *= 0
     return (dZ, db)  # (dX,db)
Beispiel #3
0
 def _bprop(self,X,w,Z,dZ): return (dZ*w,sm.sum(dZ*X,axis=0)) # (dX,dw)
 def _calc_shapes(self,X,Z,w):
Beispiel #4
0
 def _bprop(self, X, w, Z, dZ):
     return (dZ * w, sm.sum(dZ * X, axis=0))  # (dX,dw)