Ejemplo n.º 1
0
 def grad(self, x):
     self.x[:] = x
     g, g_flat, output = tool.ff_grad(self.net, self.input, self.target)
     if self.rr:
         # g_flat is link to g
         tool.reg_grad(g, self.net, self.rr)
     return g_flat
Ejemplo n.º 2
0
 def grad(self, x):
     self.x[:] = x
     g, g_flat, output = tool.ff_grad(self.net, self.input, self.target)
     if self.rr:
         # g_flat is link to g
         tool.reg_grad(g, self.net, self.rr)
     return g_flat
Ejemplo n.º 3
0
 def calc(self, net, input, target):
     g1, g2, output = tool.ff_grad(net, input, target)
     return g2, output
Ejemplo n.º 4
0
 def calc(self, net, input, target):
     g1, g2, output = tool.ff_grad(net, input, target)
     return g2, output
Ejemplo n.º 5
0
 def grad(self, x):
     self.x[:] = x
     gr = tool.ff_grad(self.net, self.input, self.target)[1]
     return gr
Ejemplo n.º 6
0
 def grad(self, x):
     self.x[:] = x
     gr = tool.ff_grad(self.net, self.input, self.target)[1]
     return gr