ebonilla / AutoGP

Code for AutoGP
Apache License 2.0
26 stars 12 forks source link

Remove custom tensorflow ops #5

Open danmackinlay opened 7 years ago

danmackinlay commented 7 years ago

Apparently we may be able to avoid the custom tensorflow triangular operations - https://github.com/tensorflow/tensorflow/issues/1825#issuecomment-337394937

Sorry for just jumping in here. But the tf.contrib.distributions.fill_triangular utility function might be useful. It reshapes a length-d*(d+1)/2 vector into a lower (or upper) triangular matrix (with zeros on the flip-side).

this will simplify packaging by avoiding compilation. Requires tensorflow master, however.

danmackinlay commented 7 years ago

Tensorflow 1.4 is out and includes triangualr matrix packing. will investigate if this remove the build step.

danmackinlay commented 7 years ago

Ah, tragically the operation did not make it in to tensorflow 1.4.; it will be in tenorflow 1.5 some time in the next few months.

https://www.tensorflow.org/versions/master/api_docs/python/tf/contrib/distributions/fill_triangular

danmackinlay commented 7 years ago

In the interim, GPFlow now has a compilation-free triangular packing called LowerTriangular which would also be an option. I do not know the performance implications fo the GPFlow approach

danmackinlay commented 7 years ago

(this would additionally solve #3)