Unverified Commit 525dbbf8 authored by Yih-Dar's avatar Yih-Dar Committed by GitHub
Browse files

Remove loss from some flax models docs & examples (#15492)



* Remove return_loss from Flax models

* fix more

* fix
Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
parent 21dcaec5
......@@ -144,8 +144,6 @@ CLIP_INPUTS_DOCSTRING = r"""
pixel_values (`numpy.ndarray` of shape `(batch_size, num_channels, height, width)`):
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
[`CLIPFeatureExtractor`]. See [`CLIPFeatureExtractor.__call__`] for details.
return_loss (`bool`, *optional*):
Whether or not to return the contrastive loss.
output_attentions (`bool`, *optional*):
Whether or not to return the attentions tensors of all attention layers. See `attentions` under returned
tensors for more detail.
......
......@@ -561,9 +561,8 @@ VISION_TEXT_DUAL_ENCODER_MODEL_DOCSTRING = r"""
... input_ids=inputs.input_ids,
... attention_mask=inputs.attention_mask,
... pixel_values=inputs.pixel_values,
... return_loss=True,
... )
>>> loss, logits_per_image = outputs.loss, outputs.logits_per_imag # this is the image-text similarity score
>>> logits_per_image = outputs.logits_per_image # this is the image-text similarity score
>>> # save and load from pretrained
>>> model.save_pretrained("vit-bert")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment