elif q_sqrt.get_shape().ndims == 2: // pragma: no cover
raise NotImplementedError("Does not support diagonal q_sqrt yet...")
else: // pragma: no cover
raise ValueError("Bad dimension for q_sqrt: %s" %
str(q_sqrt.get_shape().ndims))
if full_cov and full_output_cov:
addvar = tf.matmul(LTA, LTA, transpose_a=True) // R x NK x NK
fvar = fvar[None, :, :, :, :] + tf.reshape(addvar, (R, N, K, N, K))
After Change
elif q_sqrt.shape.ndims == 2: // pragma: no cover
raise NotImplementedError("Does not support diagonal q_sqrt yet...")
else: // pragma: no cover
raise ValueError(f"Bad dimension for q_sqrt: {q_sqrt.shape.ndims}")
if full_cov and full_output_cov:
addvar = tf.matmul(LTA, LTA, transpose_a=True) // R x NK x NK
fvar = fvar[None, :, :, :, :] + tf.reshape(addvar, (R, N, K, N, K))