"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "d0adab2c39dc486c548c0b61ad8471e27e60bd36"
Unverified Commit 76568d24 authored by Maxime G's avatar Maxime G Committed by GitHub
Browse files

Segformer TF: fix output size in documentation (#18572)



* Segformer TF: fix output size in doc

* Segformer pytorch: fix output size in doc
Co-authored-by: default avatarMaxime Gardoni <maxime.gardoni@ecorobotix.com>
parent 051311ff
...@@ -784,7 +784,7 @@ class SegformerForSemanticSegmentation(SegformerPreTrainedModel): ...@@ -784,7 +784,7 @@ 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/4, width/4)
>>> list(logits.shape) >>> list(logits.shape)
[1, 150, 128, 128] [1, 150, 128, 128]
```""" ```"""
......
...@@ -847,7 +847,7 @@ class TFSegformerForSemanticSegmentation(TFSegformerPreTrainedModel): ...@@ -847,7 +847,7 @@ class TFSegformerForSemanticSegmentation(TFSegformerPreTrainedModel):
>>> inputs = feature_extractor(images=image, return_tensors="tf") >>> inputs = feature_extractor(images=image, return_tensors="tf")
>>> outputs = model(**inputs, training=False) >>> outputs = model(**inputs, training=False)
>>> # logits are of shape (batch_size, num_labels, height, width) >>> # logits are of shape (batch_size, num_labels, height/4, width/4)
>>> logits = outputs.logits >>> logits = outputs.logits
>>> list(logits.shape) >>> list(logits.shape)
[1, 150, 128, 128] [1, 150, 128, 128]
......
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