Unverified Commit 1763770b authored by Yih-Dar's avatar Yih-Dar Committed by GitHub
Browse files

Fix some doctests (#18359)



* Fix some doctests
Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
parent 986526a0
...@@ -45,7 +45,7 @@ _EXPECTED_OUTPUT_SHAPE = [1, 1088, 7, 7] ...@@ -45,7 +45,7 @@ _EXPECTED_OUTPUT_SHAPE = [1, 1088, 7, 7]
# Image classification docstring # Image classification docstring
_IMAGE_CLASS_CHECKPOINT = "facebook/regnet-y-040" _IMAGE_CLASS_CHECKPOINT = "facebook/regnet-y-040"
_IMAGE_CLASS_EXPECTED_OUTPUT = "'tabby, tabby cat'" _IMAGE_CLASS_EXPECTED_OUTPUT = "tabby, tabby cat"
REGNET_PRETRAINED_MODEL_ARCHIVE_LIST = [ REGNET_PRETRAINED_MODEL_ARCHIVE_LIST = [
"facebook/regnet-y-040", "facebook/regnet-y-040",
......
...@@ -43,7 +43,7 @@ _EXPECTED_OUTPUT_SHAPE = [1, 1088, 7, 7] ...@@ -43,7 +43,7 @@ _EXPECTED_OUTPUT_SHAPE = [1, 1088, 7, 7]
# Image classification docstring # Image classification docstring
_IMAGE_CLASS_CHECKPOINT = "facebook/regnet-y-040" _IMAGE_CLASS_CHECKPOINT = "facebook/regnet-y-040"
_IMAGE_CLASS_EXPECTED_OUTPUT = "'tabby, tabby cat'" _IMAGE_CLASS_EXPECTED_OUTPUT = "tabby, tabby cat"
TF_REGNET_PRETRAINED_MODEL_ARCHIVE_LIST = [ TF_REGNET_PRETRAINED_MODEL_ARCHIVE_LIST = [
"facebook/regnet-y-040", "facebook/regnet-y-040",
......
...@@ -785,8 +785,8 @@ class SegformerForSemanticSegmentation(SegformerPreTrainedModel): ...@@ -785,8 +785,8 @@ class SegformerForSemanticSegmentation(SegformerPreTrainedModel):
>>> inputs = feature_extractor(images=image, return_tensors="pt") >>> inputs = feature_extractor(images=image, return_tensors="pt")
>>> outputs = model(**inputs) >>> outputs = model(**inputs)
>>> logits = outputs.logits # shape (batch_size, num_labels, height, width) >>> logits = outputs.logits # shape (batch_size, num_labels, height, width)
>>> logits.shape >>> list(logits.shape)
(1, 150, 128, 128) [1, 150, 128, 128]
```""" ```"""
return_dict = return_dict if return_dict is not None else self.config.use_return_dict return_dict = return_dict if return_dict is not None else self.config.use_return_dict
output_hidden_states = ( output_hidden_states = (
......
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