Optimized logpt computation#2959
Optimized logpt computation#2959ColCarroll merged 3 commits intopymc-devs:masterfrom junpenglao:optimized_logpt
Conversation
I change the logpt computation in #2949 to fix #2948, however, it slows down the speed as some graph optimization is turned off (those optimization is originally cause the error in #2948). I am trying with a differen approach here. @ColCarroll
|
I don't quite understand the problem: it looks like you are trying a more explicit loop to give the compiler a better chance of optimizing? I guess I also don't understand what caused the edge case in the first place, and whether it is ok to let that fail (that is the failing test) |
|
Thanks for having a look @ColCarroll. |
|
Seems like a theano bug, no? |
|
@twiecki not sure, I cannot really pin down where exactly is the error yet... compiling a theano function using pm.Lognormal.dist().logp()+... etc works without problem |
|
Ran the |
|
So, this PR makes me quite paranoid so I did a bit more digging. All the output is in the folder below if you would like to test on your own model https://github.com/junpenglao/Planet_Sakaar_Data_Science/tree/master/Miscellaneous/theano_graph_optim |
* Optimized logpt computation I change the logpt computation in pymc-devs#2949 to fix pymc-devs#2948, however, it slows down the speed as some graph optimization is turned off (those optimization is originally cause the error in pymc-devs#2948). I am trying with a differen approach here. @ColCarroll * fix test
I change the logpt computation in #2949 to fix #2948, however, it slows down the speed as some graph optimization is turned off (those optimization is originally cause the error in #2948). I am trying with a differen approach here.
@ColCarroll