tensorflow / tensorflow/probability
Save the architecture of a Bayesian neural network
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 4.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
I have read the following issue posts: https://github.com/tensorflow/probability/issues/325 and https://github.com/tensorflow/probability/issues/289.
I know I can just save/load the weights of a BNN by simply using functions of model.save_weights and model.load_weights (though I actually used tf.keras.callbacks.ModelCheckpoint to implicitly save the weights with the best performance metrics).
However, my goal is to save the architecture of a Bayesian neural network (BNN). What I tried are:
model.to_json(): saw issue https://github.com/tensorflow/probability/issues/325
model.to_yaml(): can save but cannot load
model.get_config(): can save but cannot load
Is there any workaround to save the architecture of a model that uses TensorFlow Probability layers to a file on the disk?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the linked issues 325 and 289, then compare the serialization behavior of model.to_json(), model.to_yaml(), model.get_config(), and the mentioned weight-saving methods. Determine whether a supported architecture save/load path exists for TensorFlow Probability layers; done would be a confirmed workaround or a clearly scoped implementation request.
Written by the indexing model from the issue text.
Assessment
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100