google-deepmind / torch-distributions

Probability distributions, wrapped for Torch.
BSD 3-Clause "New" or "Revised" License
61 stars 25 forks source link

replaced mm + trace by dot in wishart.logpdf #30

Closed dpfau closed 9 years ago

dpfau commented 9 years ago

This optimizes the dot product between two matrices. The two operations give the same result, but the original implementation allocated a new matrix while the new implementation does not require any intermediate memory (the inverse in both versions is unavoidable though)