--
You received this message because you are subscribed to the Google Groups "TensorFlow Probability" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tfprobabilit...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/tfprobability/a0e2029a-0234-4c82-9291-3f699ee35276%40tensorflow.org.
If you're using a relatively recent build of TFP, then distributions and bijectors all extend from tf.Module, which makes export/import easy via https://www.tensorflow.org/versions/r2.0/api_docs/python/tf/train/Checkpoint?hl=en
On Fri, Sep 6, 2019 at 10:34 AM Omar <om...@cancergenomics.co.uk> wrote:
Hi all,--I am training a tfp model that takes quite a long time to learn. After the training I would like to be able to save it and reload when needed. My model includes some variational layers whose main properties are the posteriors of the weights.I am relatively new to tensorflow world so I looked on the internet but did not find too much.Do you know how can I save tf models that include tfp variational layers? Even some documentation or explanation is ok.Thanks!
You received this message because you are subscribed to the Google Groups "TensorFlow Probability" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tfprob...@tensorflow.org.
--
You received this message because you are subscribed to the Google Groups "TensorFlow Probability" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tfprobabilit...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/tfprobability/20f8c94b-fadb-426b-b70a-f76d29a27e75%40tensorflow.org.
checkpoint = tf.train.Checkpoint(optimizer=opt)
manager = tf.train.CheckpointManager(
checkpoint, './.tf_ckpts',
checkpoint_name=checkpoint_name, max_to_keep=3)
print_tensors_in_checkpoint_file(latest_ckp, all_tensors=True, tensor_name='')
NoneIt would probably make sense to audit the set of variables you see in the checkpoint to ensure it's everything you expect.While we have migrated most distributions & bijectors to hold on to variable references, there are a couple tf.convert_to_tensor calls still left in __init__ methods, which would cause variables to not get exported.
On Fri, Sep 6, 2019 at 12:24 PM Omar <om...@cancergenomics.co.uk> wrote:
It seems to save! Although the accuracy decreases... probably I am implementing it wrong. Will check again!--
On Friday, September 6, 2019 at 3:34:47 PM UTC+1, Omar wrote:Hi all,I am training a tfp model that takes quite a long time to learn. After the training I would like to be able to save it and reload when needed. My model includes some variational layers whose main properties are the posteriors of the weights.I am relatively new to tensorflow world so I looked on the internet but did not find too much.Do you know how can I save tf models that include tfp variational layers? Even some documentation or explanation is ok.Thanks!
You received this message because you are subscribed to the Google Groups "TensorFlow Probability" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tfprob...@tensorflow.org.