tensorflow-probability

How to use values from previous Keras layer in convert_to_tensor_fn for TensorFlow Probability DistributionLambda

How to use values from previous Keras layer in convert_to_tensor_fn for TensorFlow Probability DistributionLambda Question: I have a Keras/TensorFlow Probability model where I would like to include values from the prior layer in the convert_to_tensor_fn parameter in the following DistributionLambda layer. Ideally, I wish I could do something like this: from functools import partial import …

Total answers: 2

How to clone/duplicate a TensorFlow Probability neural network model

How to clone/duplicate a TensorFlow Probability neural network model Question: I have a TensorFlow Probability model that is built similar to models described in this YouTube Video. I’m using python==3.8.11 tensorflow==2.10.0 tensorflow-probability==0.18.0 Here’s the code to build the model: def posterior_mean_field(kernel_size: int, bias_size: int, dtype: Any) -> tf.keras.Model: n = kernel_size + bias_size c = …

Total answers: 1

Measuring incertainty in Bayesian Neural Network

Measuring incertainty in Bayesian Neural Network Question: Hy everybody, I’m beginning with tensorflow probability and I have some difficulties to interpret my Bayesian neural network outputs. I’m working on a regression case, and started with the example provided by tensorflow notebook here: https://blog.tensorflow.org/2019/03/regression-with-probabilistic-layers-in.html?hl=fr As I seek to know the uncertainty of my network predictions, I …

Total answers: 1

How to run scipy's BFGS on GPU

How to run scipy's BFGS on GPU Question: I’d like to run scipy implementation of BFGS optimization algorithm on GPU and scipy seems not to support GPUs. The target function which I want to run on GPU is the following one which is part of the implementation of this repository: //here the variable initializations opts …

Total answers: 1