Skip to content

Commit 875b796

Browse files
committed
updates
1 parent de09b0b commit 875b796

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/MMLLM/庖丁解牛BLIP2.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ image_feats 中每个 image_feat 与 text_feat 计算一个 similarity score ,
154154

155155
![similarity score](庖丁解牛BLIP2/5.png)
156156

157+
如何计算loss的: “in-batch negatives”,该方法正是CLIP在VLP领域发扬光大的。以下引用CLIP论文图做说明:
158+
159+
![in-batch negatives](庖丁解牛BLIP2/6.png)
157160

158161
```python
159162
###============== Image-text Contrastive ===================###
@@ -192,6 +195,7 @@ image_feats 中每个 image_feat 与 text_feat 计算一个 similarity score ,
192195
```
193196

194197

198+
195199
BertLayer 核心代码实现如下:
196200

197201
```python

src/MMLLM/庖丁解牛BLIP2/6.png

107 KB
Loading

0 commit comments

Comments
 (0)