{"record":{"id":"36f089121a872d7f","repo":"tensorflow/models","slug":"likelihood-self-likelihood-only-support-univaria","errorCode":null,"errorMessage":"likelihood={self.likelihood} only support univariate logits.Got logits dimension: {logits.shape[-1]}","messagePattern":"likelihood=(.+?) only support univariate logits\\.Got logits dimension: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/nlp/modeling/layers/gaussian_process.py","lineNumber":343,"sourceCode":"            shape=(gp_feature_dim, gp_feature_dim),\n            dtype=self.dtype,\n            initializer=tf_keras.initializers.Identity(self.ridge_penalty),\n            trainable=False,\n            aggregation=tf.VariableAggregation.ONLY_FIRST_REPLICA))\n    self.built = True\n\n  def make_precision_matrix_update_op(self,\n                                      gp_feature,\n                                      logits,\n                                      precision_matrix):\n    \"\"\"Defines update op for the precision matrix of feature weights.\"\"\"\n    if self.likelihood != 'gaussian':\n      if logits is None:\n        raise ValueError(\n            f'\"logits\" cannot be None when likelihood={self.likelihood}')\n\n      if logits.shape[-1] != 1:\n        raise ValueError(\n            f'likelihood={self.likelihood} only support univariate logits.'\n            f'Got logits dimension: {logits.shape[-1]}')\n\n    batch_size = tf.shape(gp_feature)[0]\n    batch_size = tf.cast(batch_size, dtype=gp_feature.dtype)\n\n    # Computes batch-specific normalized precision matrix.\n    if self.likelihood == 'binary_logistic':\n      prob = tf.sigmoid(logits)\n      prob_multiplier = prob * (1. - prob)\n    elif self.likelihood == 'poisson':\n      prob_multiplier = tf.exp(logits)\n    else:\n      prob_multiplier = 1.\n\n    gp_feature_adjusted = tf.sqrt(prob_multiplier) * gp_feature\n    precision_matrix_minibatch = tf.matmul(\n        gp_feature_adjusted, gp_feature_adjusted, transpose_a=True)","sourceCodeStart":325,"sourceCodeEnd":361,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/nlp/modeling/layers/gaussian_process.py#L325-L361","documentation":"Error \"likelihood={self.likelihood} only support univariate logits.Got logits dimension: {logits.shape[-1]}\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/nlp/modeling/layers/gaussian_process.py:343 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e006f5f0d534913e49c1f1dae87364039fa607e2","analyzedAt":"2026-08-24T14:09:15.576Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}