Anonymous avatar Anonymous committed 0b643cd

move src. loc. of ElmanNet.dUcdUc

Comments (0)

Files changed (1)

pyrnn/elmannet.py

         self.ns.dEdUo = delta * self.ns.dXodUo
         self.ns.Eto   = delta**2 / 2.0
 
-    def dUcdUc(self,t):
-        "return matrix dUc'[t+1]/dUc[t]"
-        ec = self.ns.ec
-        wcc = self.ns.wcc
-        dXcdUc = self.ns.dXcdUc
-        dot = numpy.dot
-        diag = numpy.diag
-        return diag(1-ec) + dot(diag(ec),dot(wcc,diag(dXcdUc[t])))
-
     def bptt(self):
         xc = self.ns.xc
         xi = self.ns.xi
             dEdBc[:] += dEdUc[t]
         ## dEdUc[0] += dot(dEdUo[0],woc)*dXcdUc[0]
         ## dEdWoc[:] += outer(dEdUo[0],xc[0])
-        ## dEdBo[:] += dEdUo[t]
-        ## dEdBc[:] += dEdUc[0]
+        ## dEdBo[:] += dEdUo[0]
+        dEdBc[:] += dEdUc[0]
+
+    def dUcdUc(self,t):
+        "return matrix dUc'[t+1]/dUc[t]"
+        ec = self.ns.ec
+        wcc = self.ns.wcc
+        dXcdUc = self.ns.dXcdUc
+        dot = numpy.dot
+        diag = numpy.diag
+        return diag(1-ec) + dot(diag(ec),dot(wcc,diag(dXcdUc[t])))
 
     def reset_grad(self):
         for var in self.ns.get_vars(['dEdUc','dEdBo','dEdBc',
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.