probability icon indicating copy to clipboard operation
probability copied to clipboard

How to initialize weights and bias for a tfp.layers.Convolution2DFlipout from a pre-trained tf.keras.layers.Conv2D?

Open RRK13 opened this issue 4 years ago • 1 comments

how to initialize weights and bias for model build using tfp.layers.Convolution2DFlipout from a pre-trained model with tf.keras.layers.Conv2D. Both having the same number of layers.

RRK13 avatar Jun 22 '21 19:06 RRK13

IT seems that you are trying to implement empiric bayes approach. See something like MOPED .

conv2D has a point estimate per weight which is really a mean estimate. If you use flipout layer with the normal distribution you can copy the mean part but you need to provide value for the standard deviation as well. You can initialize that term as the percentage around the mean as suggested in MOPED algorithm above. I dont have prototyped weight extraction from flipout layer but it should be similar to conv2D.

MarkoOrescanin avatar Dec 31 '21 23:12 MarkoOrescanin