def grad(x):
     grad = np.zeros_like(x)
     ldirichlet_softmax(x, alpha, grad=grad)
     return grad
 def func(x):
     return ldirichlet_softmax(x, alpha)
 def logprob(x, alpha):
     grad = np.zeros_like(x)
     logp = ldirichlet_softmax(x, alpha, grad=grad)
     return logp, grad
Beispiel #4
0
 def grad(x):
     grad = np.zeros_like(x)
     ldirichlet_softmax(x, alpha, grad=grad)
     return grad
Beispiel #5
0
 def func(x):
     return ldirichlet_softmax(x, alpha)
Beispiel #6
0
 def logprob(x, alpha):
     grad = np.zeros_like(x)
     logp = ldirichlet_softmax(x, alpha, grad=grad)
     return logp, grad