Translate en/model_doc to JP (#27264)
* Add `model_docs` * Add * Update Model adoc * Update docs/source/ja/model_doc/bark.md Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> * Update docs/source/ja/model_doc/beit.md Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> * Update docs/source/ja/model_doc/bit.md Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> * Update docs/source/ja/model_doc/blenderbot.md Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> * Update docs/source/ja/model_doc/blenderbot-small.md Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> * update reiew-1 * Update toctree.yml * translating docs and fixes of PR #27401 * Update docs/source/ja/model_doc/bert.md Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> * Update docs/source/ja/model_doc/bert-generation.md Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> * Update the model docs --------- Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
This commit is contained in:
@@ -51,10 +51,10 @@ inputs = processor(text=candidate_labels, images=image, return_tensors="pt")
|
||||
with torch.no_grad():
|
||||
outputs = model(**inputs)
|
||||
|
||||
# これは画像-テキスト類似度スコア
|
||||
# this is the image-text similarity score
|
||||
logits_per_image = outputs.logits_per_image
|
||||
|
||||
# Softmaxを取ることで各ラベルの確率を得られる
|
||||
# we can take the softmax to get the label probabilities
|
||||
probs = logits_per_image.softmax(dim=1)
|
||||
print(probs)
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user