8 questions
0
votes
0
answers
333
views
AttributeError: 'tuple' object has no attribute 'rank' when using tensorflow_probability.layers.DenseVariational
I'm trying to use bayesian neural networks, adding a bayesian layer to a neural networks model. Here is the code I'm using and it's from the keras website.
import numpy as np
import tensorflow as tf
...
0
votes
1
answer
413
views
difference between dense-layer types in tensor-flow probability
I study Bayesian Deep learning and for implement it, i found a library tensor-flow probability , for Dense layer in standard deep learning , there Dense-Variational ,Dense-reparameterize and Dense-...
0
votes
1
answer
149
views
validation loss goes up and down [variational inference]
i was training a mlp through variational inference for a regression task on a small dataset with 1 feature. The nn works and the training loss goes down but the validation loss has random spikes ...
0
votes
1
answer
164
views
The parameter kl_use_exact in DenseVariational layer of TF
Trying to create a Bayesian neural network using DenseVariational layer in Tensorflow probability. My question is when we set the parameter kl_use_exact to False does by that we are not taking the ...
1
vote
0
answers
417
views
Variational Inference with Normalizing Flows in Tensorflow Probability
In the last time I've read a little bit about using normalizing flows to improve variational inference f.e. Link1 Link2.
Tensorflow probability already offers RealNVP and MaskedAutoregressiveFlow in ...
5
votes
3
answers
791
views
How to save a model with DenseVariational layer?
I'm trying to build a model with DenseVariational layer so that it can report epistemic uncertainties. Something like https://www.tensorflow.org/probability/examples/Probabilistic_Layers_Regression#...
1
vote
2
answers
898
views
Regression Model with 3 Hidden DenseVariational Layers in Tensorflow-Probability returns nan as loss during training
I am getting acquainted with Tensorflow-Probability and here I am running into a problem. During training, the model returns nan as the loss (possibly meaning a huge loss that causes overflowing). ...
0
votes
1
answer
678
views
Number of parameters in Tensorflow-Probability network using DenseVariational layers
I cannot figure out why the model returned has in the second layer 189 parameters. The way I calculate them they should be more. Why is this happening?
The code is the following:
# Define the prior ...