Skip to content

Commit

Permalink
[Sage/Uncertainty] Adds Gaussian process layer to CSF triggering head.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 332726662
  • Loading branch information
jereliu authored and edward-bot committed Sep 20, 2020
1 parent ee83c00 commit 02b60b8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions edward2/tensorflow/layers/random_feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ def __init__(self,
def build(self, input_shape):
gp_feature_dim = input_shape[-1]

# Convert gp_feature_dim to int value for TF1 compatibility.
if isinstance(gp_feature_dim, tf.compat.v1.Dimension):
gp_feature_dim = gp_feature_dim.value

# Posterior precision matrix for the GP' random feature coefficients.
self.precision_matrix = (
self.add_weight(
Expand Down

0 comments on commit 02b60b8

Please sign in to comment.