Is there any c++ inference API in tfp?
Is there any c++ inference API in tfp?
Thanks
For c++ I'd suggest using tf.saved_model to export a tf.Module with the relevant inference inside a tf.function method thereof. You should then be able to use the TF serving package.
On Tue, Oct 1, 2019, 5:52 PM Qi Luo [email protected] wrote:
Is there any c++ inference API in tfp?
Thanks
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tensorflow/probability/issues/582?email_source=notifications&email_token=AFJFSIZ77THAG45VQLZADCDQMPBBLA5CNFSM4I4PIKRKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HO7FV5A, or mute the thread https://github.com/notifications/unsubscribe-auth/AFJFSIZDFESYFY7MOVSVFIDQMPBBLANCNFSM4I4PIKRA .
Simplest possible thing:
class Model(tf.Module):
@tf.function(input_signature=(tf.TensorSpec(dtype=tf.float32, shape=[2])
def f(self, loc):
return tfd.Normal(loc, 1).sample(3)
tf.saved_model.save(Model(), '/tmp/model')