{"version":2,"relationshipURLBase":"https://codingai-lec03.pages.dev/course/notebook-blocks/880250bb392141d3b60ed38535b8d073.html","relationshipResolution":"Resolve relative relationship URLs against relationshipURLBase; complete records and absolute URLs are in blocks.","title":"同一对象只交换左右，真实 CLIP 是否跟着关系改变？ · 实现代码","url":"https://codingai-lec03.pages.dev/course/notebook-blocks/880250bb392141d3b60ed38535b8d073.html","markdown":"https://codingai-lec03.pages.dev/course/notebook-blocks/880250bb392141d3b60ed38535b8d073.md","pages":[{"id":"reading-opening","title":"同一对象只交换左右，真实 CLIP 是否跟着关系改变？ · 实现代码","unit":"同一对象只交换左右，真实 CLIP 是否跟着关系改变？ · 实现代码","unitId":"notebook-blocks/880250bb392141d3b60ed38535b8d073","chapter":"course","number":1}],"aliases":[{"oldId":"b-4b7ae0da63ae9943fcaf6171","targetId":"b-4b7ae0da63ae9943fcaf6171","page":"reading-opening","operation":"move","beforeSHA256":"b097cc692a4f43c3eeba08ce9c2e73c631f1bad298a5fb1dec9efa967315dac3","afterSHA256":"b097cc692a4f43c3eeba08ce9c2e73c631f1bad298a5fb1dec9efa967315dac3","reason":"Same source body in authored semantic page"},{"oldId":"b-223d1026f5e3706199f44140","targetId":"b-223d1026f5e3706199f44140","page":"reading-opening","operation":"move","beforeSHA256":"37e815aadaf77673304870659178b0fccf4643ef584f79fc77732667193e10bd","afterSHA256":"37e815aadaf77673304870659178b0fccf4643ef584f79fc77732667193e10bd","reason":"Same source body in authored semantic page"},{"oldId":"b-560e2cf49bc3a1c0bd557a29","targetId":"b-560e2cf49bc3a1c0bd557a29","page":"reading-opening","operation":"move","beforeSHA256":"42cba31deccba2a350b9b23bd0ca1dcaa4c4c5cb9d35c773e1fcb89124788ccd","afterSHA256":"42cba31deccba2a350b9b23bd0ca1dcaa4c4c5cb9d35c773e1fcb89124788ccd","reason":"Same source body in authored semantic page"},{"oldId":"b-b5a10a01b41bba79232e6351","targetId":"b-b5a10a01b41bba79232e6351","page":"reading-opening","operation":"move","beforeSHA256":"90e8ba62b9af4bedd5be3a2559568519f4df7a42b13048f81039496efd45dea2","afterSHA256":"90e8ba62b9af4bedd5be3a2559568519f4df7a42b13048f81039496efd45dea2","reason":"Same source body in authored semantic page"},{"oldId":"b-7b02b65447ac49bcdeeaf606","targetId":"b-7b02b65447ac49bcdeeaf606","page":"reading-opening","operation":"move","beforeSHA256":"2ec5369fc96bcf8962f7df785a96a1a27dcfbec593a55fc99ff5752411bcdcec","afterSHA256":"2ec5369fc96bcf8962f7df785a96a1a27dcfbec593a55fc99ff5752411bcdcec","reason":"Same source body in authored semantic page"}],"blocks":[{"id":"b-4b7ae0da63ae9943fcaf6171","type":"p","scope":"document","url":"https://codingai-lec03.pages.dev/course/notebook-blocks/880250bb392141d3b60ed38535b8d073.html#b-4b7ae0da63ae9943fcaf6171","content":"[LAB 04 · CLIP：候选、提示与关系检验](/course/notebooks/0ba963931ddf4866b507b210d93a43bf.html)","sha256":"b097cc692a4f43c3eeba08ce9c2e73c631f1bad298a5fb1dec9efa967315dac3","chapter":{"id":"course","title":"同一对象只交换左右，真实 CLIP 是否跟着关系改变？ · 实现代码"},"unit":{"id":"notebook-blocks/880250bb392141d3b60ed38535b8d073","title":"同一对象只交换左右，真实 CLIP 是否跟着关系改变？ · 实现代码"},"page":{"id":"reading-opening","title":"同一对象只交换左右，真实 CLIP 是否跟着关系改变？ · 实现代码","number":1},"sectionTitle":"同一对象只交换左右，真实 CLIP 是否跟着关系改变？ · 实现代码","currentQuestion":"同一对象只交换左右，真实 CLIP 是否跟着关系改变？ · 实现代码","sourceSlides":[],"knowledgeBlock":null,"formulas":[],"previousBlock":null,"nextBlock":"b-223d1026f5e3706199f44140","prerequisites":[],"relatedBlocks":[]},{"id":"b-223d1026f5e3706199f44140","type":"h1","scope":"document","url":"https://codingai-lec03.pages.dev/course/notebook-blocks/880250bb392141d3b60ed38535b8d073.html#b-223d1026f5e3706199f44140","content":"# 同一对象只交换左右，真实 CLIP 是否跟着关系改变？ · 实现代码","sha256":"37e815aadaf77673304870659178b0fccf4643ef584f79fc77732667193e10bd","chapter":{"id":"course","title":"同一对象只交换左右，真实 CLIP 是否跟着关系改变？ · 实现代码"},"unit":{"id":"notebook-blocks/880250bb392141d3b60ed38535b8d073","title":"同一对象只交换左右，真实 CLIP 是否跟着关系改变？ · 实现代码"},"page":{"id":"reading-opening","title":"同一对象只交换左右，真实 CLIP 是否跟着关系改变？ · 实现代码","number":1},"sectionTitle":"同一对象只交换左右，真实 CLIP 是否跟着关系改变？ · 实现代码","currentQuestion":"同一对象只交换左右，真实 CLIP 是否跟着关系改变？ · 实现代码","sourceSlides":[],"knowledgeBlock":null,"formulas":[],"previousBlock":"b-4b7ae0da63ae9943fcaf6171","nextBlock":"b-560e2cf49bc3a1c0bd557a29","prerequisites":[{"id":"b-4b7ae0da63ae9943fcaf6171","url":"#b-4b7ae0da63ae9943fcaf6171","role":"problem-context"}],"relatedBlocks":[]},{"id":"b-560e2cf49bc3a1c0bd557a29","type":"p","scope":"document","url":"https://codingai-lec03.pages.dev/course/notebook-blocks/880250bb392141d3b60ed38535b8d073.html#b-560e2cf49bc3a1c0bd557a29","content":"主线阅读与优先实验","sha256":"42cba31deccba2a350b9b23bd0ca1dcaa4c4c5cb9d35c773e1fcb89124788ccd","chapter":{"id":"course","title":"同一对象只交换左右，真实 CLIP 是否跟着关系改变？ · 实现代码"},"unit":{"id":"notebook-blocks/880250bb392141d3b60ed38535b8d073","title":"同一对象只交换左右，真实 CLIP 是否跟着关系改变？ · 实现代码"},"page":{"id":"reading-opening","title":"同一对象只交换左右，真实 CLIP 是否跟着关系改变？ · 实现代码","number":1},"sectionTitle":"同一对象只交换左右，真实 CLIP 是否跟着关系改变？ · 实现代码","currentQuestion":"同一对象只交换左右，真实 CLIP 是否跟着关系改变？ · 实现代码","sourceSlides":[],"knowledgeBlock":null,"formulas":[],"previousBlock":"b-223d1026f5e3706199f44140","nextBlock":"b-b5a10a01b41bba79232e6351","prerequisites":[{"id":"b-223d1026f5e3706199f44140","url":"#b-223d1026f5e3706199f44140","role":"section-title"},{"id":"b-4b7ae0da63ae9943fcaf6171","url":"#b-4b7ae0da63ae9943fcaf6171","role":"problem-context"}],"relatedBlocks":[]},{"id":"b-b5a10a01b41bba79232e6351","type":"p","scope":"document","url":"https://codingai-lec03.pages.dev/course/notebook-blocks/880250bb392141d3b60ed38535b8d073.html#b-b5a10a01b41bba79232e6351","content":"真实CLIP输入/权重/分数、候选改动、四条件规则与独立关系推理","sha256":"90e8ba62b9af4bedd5be3a2559568519f4df7a42b13048f81039496efd45dea2","chapter":{"id":"course","title":"同一对象只交换左右，真实 CLIP 是否跟着关系改变？ · 实现代码"},"unit":{"id":"notebook-blocks/880250bb392141d3b60ed38535b8d073","title":"同一对象只交换左右，真实 CLIP 是否跟着关系改变？ · 实现代码"},"page":{"id":"reading-opening","title":"同一对象只交换左右，真实 CLIP 是否跟着关系改变？ · 实现代码","number":1},"sectionTitle":"同一对象只交换左右，真实 CLIP 是否跟着关系改变？ · 实现代码","currentQuestion":"同一对象只交换左右，真实 CLIP 是否跟着关系改变？ · 实现代码","sourceSlides":[],"knowledgeBlock":null,"formulas":[],"previousBlock":"b-560e2cf49bc3a1c0bd557a29","nextBlock":"b-7b02b65447ac49bcdeeaf606","prerequisites":[{"id":"b-223d1026f5e3706199f44140","url":"#b-223d1026f5e3706199f44140","role":"section-title"},{"id":"b-4b7ae0da63ae9943fcaf6171","url":"#b-4b7ae0da63ae9943fcaf6171","role":"problem-context"}],"relatedBlocks":[]},{"id":"b-7b02b65447ac49bcdeeaf606","type":"pre","scope":"document","url":"https://codingai-lec03.pages.dev/course/notebook-blocks/880250bb392141d3b60ed38535b8d073.html#b-7b02b65447ac49bcdeeaf606","content":"```\n# 重做缓存后的关系排序；可改排序/显示，不能改真值去迎合模型。\ncos=a['relation_images']@a['relation_text'].T\nprint('关系 cosine:',cos)\nprint('预测:',cos.argmax(1),'真值:',[0,1])\nassert cos.argmax(1).tolist()==[1,1]  # 当前已核验缓存的实际反例\nfor r in manifest['relation']:\n    from IPython.display import display\n    from PIL import Image\n    display(Image.open(RETRIEVAL_ROOT/r['path']))\n\n```","sha256":"2ec5369fc96bcf8962f7df785a96a1a27dcfbec593a55fc99ff5752411bcdcec","chapter":{"id":"course","title":"同一对象只交换左右，真实 CLIP 是否跟着关系改变？ · 实现代码"},"unit":{"id":"notebook-blocks/880250bb392141d3b60ed38535b8d073","title":"同一对象只交换左右，真实 CLIP 是否跟着关系改变？ · 实现代码"},"page":{"id":"reading-opening","title":"同一对象只交换左右，真实 CLIP 是否跟着关系改变？ · 实现代码","number":1},"sectionTitle":"同一对象只交换左右，真实 CLIP 是否跟着关系改变？ · 实现代码","currentQuestion":"同一对象只交换左右，真实 CLIP 是否跟着关系改变？ · 实现代码","sourceSlides":[],"knowledgeBlock":null,"formulas":[],"previousBlock":"b-b5a10a01b41bba79232e6351","nextBlock":null,"prerequisites":[{"id":"b-223d1026f5e3706199f44140","url":"#b-223d1026f5e3706199f44140","role":"section-title"},{"id":"b-4b7ae0da63ae9943fcaf6171","url":"#b-4b7ae0da63ae9943fcaf6171","role":"problem-context"}],"relatedBlocks":[]}]}
