mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
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: Maxime Gardoni <maxime.gardoni@ecorobotix.com>
This commit is contained in:
parent
051311ff66
commit
76568d24b6
@ -784,7 +784,7 @@ class SegformerForSemanticSegmentation(SegformerPreTrainedModel):
|
||||
|
||||
>>> inputs = feature_extractor(images=image, return_tensors="pt")
|
||||
>>> 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)
|
||||
[1, 150, 128, 128]
|
||||
```"""
|
||||
|
@ -847,7 +847,7 @@ class TFSegformerForSemanticSegmentation(TFSegformerPreTrainedModel):
|
||||
|
||||
>>> inputs = feature_extractor(images=image, return_tensors="tf")
|
||||
>>> 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
|
||||
>>> list(logits.shape)
|
||||
[1, 150, 128, 128]
|
||||
|
Loading…
Reference in New Issue
Block a user