Beispiel #1
0
 def grads(x, y):
     return (
         grad(f, "x")(x, y),
         grad(f, "x")(x, y, dout=2),
         grad(f, 0)(x, y),
         grad(f, "y")(x, y),
         grad(f, "x", "y")(x, y),
         grad(f, "*")(x, y),
         grad(f, return_value=True)(x, y),
     )
Beispiel #2
0
 def grads(x, y):
     return (
         grad(f, 'x')(x, y),
         grad(f, 'x')(x, y, dout=2),
         grad(f, 0)(x, y),
         grad(f, 'y')(x, y),
         grad(f, 'x', 'y')(x, y),
         grad(f, '*')(x, y),
         grad(f, return_value=True)(x, y),
     )
Beispiel #3
0
 def gradbad5(x, y, z):
     return grad(f)(x=x, y=y)
Beispiel #4
0
 def gradbad4(x, y, z):
     return grad(f, 2)(x, y)
Beispiel #5
0
 def gradbad3(x, y, z):
     return grad(f, z)(x, y)
Beispiel #6
0
 def f(x):
     return grad(grad(g))(x)
Beispiel #7
0
 def f(xs, y):
     return grad(g)(xs, y)
Beispiel #8
0
 def gradbad10(x, y):
     return grad(partial(f, x))(y)
Beispiel #9
0
    def gradbad8(x, y):
        def klojure(q):
            return q + y

        return grad(klojure)(x)
Beispiel #10
0
 def peach(x, y):
     return grad(scalar_mul)(x, y)
Beispiel #11
0
 def gradbad6(x, y, z):
     return grad(f, 0, "*")(x, y)
Beispiel #12
0
 def gradbad2(x, y):
     return grad(f, "z")(x, y)
Beispiel #13
0
def test_backward_infer(model, x, y):
    return grad(cost)(model, x, y)
Beispiel #14
0
 def f(x):
     return grad(grad(sumtree))(x)
Beispiel #15
0
 def gradbad6(x, y, z):
     return grad(f, 0, '*')(x, y)
Beispiel #16
0
 def gradbad7(x, y, z):
     return grad(f, raturn_velue=True)(x, y)
Beispiel #17
0
 def apple(x, y):
     return grad(gadd)(x, y)
Beispiel #18
0
 def gradbad9(x, y):
     return grad(x)(y)
Beispiel #19
0
 def gradbad(x, y):
     return grad(f, (0, 1))(x, y)
Beispiel #20
0
 def gradbad11(x, y):
     return grad(P.scalar_mod)(x, y)
Beispiel #21
0
 def gradbad2(x, y):
     return grad(f, 'z')(x, y)
Beispiel #22
0
 def f(x):
     return grad(grad(square))(x)
Beispiel #23
0
 def f(x):
     return grad(grad(grad(grad(polynomial))))(x)