tensorflow/models · error · ValueError
Unknown `output` value "%s". `output` can be either "logits"
Error message
Unknown `output` value "%s". `output` can be either "logits" or "predictions"
What it means
Error "Unknown `output` value "%s". `output` can be either "logits" or "predictions"" thrown in tensorflow/models.
Source
Thrown at official/projects/qat/nlp/modeling/networks/span_labeling.py:77
activation=activation,
kernel_initializer=initializer,
name='predictions/transform/logits')
logits_layer = tfmot.quantization.keras.QuantizeWrapperV2(
logits_layer,
configs.Default8BitQuantizeConfig(['kernel'], ['activation'], False))
intermediate_logits = logits_layer(sequence_data)
start_logits, end_logits = self._split_output_tensor(intermediate_logits)
start_predictions = tf_keras.layers.Activation(tf.nn.log_softmax)(
start_logits)
end_predictions = tf_keras.layers.Activation(tf.nn.log_softmax)(end_logits)
if output == 'logits':
output_tensors = [start_logits, end_logits]
elif output == 'predictions':
output_tensors = [start_predictions, end_predictions]
else:
raise ValueError(
('Unknown `output` value "%s". `output` can be either "logits" or '
'"predictions"') % output)
# b/164516224
# Once we've created the network using the Functional API, we call
# super().__init__ as though we were invoking the Functional API Model
# constructor, resulting in this object having all the properties of a model
# created using the Functional API. Once super().__init__ is called, we
# can assign attributes to `self` - note that all `self` assignments are
# below this line.
super().__init__(
inputs=[sequence_data], outputs=output_tensors, **kwargs)
config_dict = {
'input_width': input_width,
'activation': activation,
'initializer': initializer,
'output': output,
}View on GitHub (pinned to e006f5f0d5)
When it happens
Trigger: Thrown at official/projects/qat/nlp/modeling/networks/span_labeling.py:77 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tensorflow/models@e006f5f0d5 (2026-08-24).
Data as JSON: /api/errors/cd6a899385f5c303.
Report an issue: GitHub.