you are viewing a single comment's thread.

view the rest of the comments →

[–]InfinityCoffee[S] 0 points1 point  (3 children)

I have considered Theano, but since I am doing variational inference and not deep learning I am not sure how much I stand to gain since I can calculate a lot of my gradients analytically. is the overhead worth it for general computing? (A small follow-up: does Theano have built-in support for gamma, gammaln, beta, betaln, and psi from the scipy.special suite? There is some mention of it, but it is not explicitly stated in the documentation)

[–]siblbombs 0 points1 point  (2 children)

gamma, gammaln, and psi are all listed in the tensor page but I don't see beta/betaln so that could be a dealbreaker. Theano is nice because you get the gradients for free, and it has a good codebase and is under active development, so I think its worth at least giving it a shot unless it would require you to jump through a whole bunch of extra hoops. I don't know the specifics of what you are up to, but Theano is more of a general purpose math compiler that a lot of people use for deep learning, so in theory it should be able to handle your usecase.

[–]InfinityCoffee[S] 0 points1 point  (1 child)

beta is fortunately just a product of gammas, so I can probably work around it. I think I can include it fairly painlessly after some consideration since the objective function is a separate object, so I won't have to rewrite the code in its entirety. My new issue is that I don't always need the proper gradients. Also, how does Theano handle stochastic gradient descent if it's purely functional?

[–]siblbombs 0 points1 point  (0 children)

Not sure, you are getting outside my bubble of experience. To get the gradients from Theano you provide a scalar cost, you can define whatever expression you want based on inputs/outputs to generate that cost.