<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>伊茗雪</title>
        <link>intro/</link>
        <description>知音者会寻声来和</description>
        <lastBuildDate>Mon, 11 May 2026 10:38:54 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>zh-CN</language>
        <copyright>All rights reserved 2026, 伊茗雪</copyright>
        <item>
            <title><![CDATA[波普艺术-对视回眸]]></title>
            <link>intro/article/art1</link>
            <guid>intro/article/art1</guid>
            <pubDate>Sun, 18 Jan 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[本作品来自我本科二年级时选修公选课“家居生活美学”所布置的一次作业，要求使用波普艺术进行创作，不限题材。老师给出了98分全班第一的分数，并进行了课堂展示。]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-2eb00c660d2781f8913dd48f9f508a06"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-callout notion-gray_background_co notion-block-2ec00c660d278000874bff8bc09b9a99"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><h3 class="notion-h notion-h2 notion-block-2ec00c660d2780aaa10bf6554f1b195f" data-id="2ec00c660d2780aaa10bf6554f1b195f"><span><div id="2ec00c660d2780aaa10bf6554f1b195f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ec00c660d2780aaa10bf6554f1b195f" title="本作品来自我本科二年级时选修公选课“家居生活美学”所布置的一次作业，要求使用波普艺术进行创作，不限题材。老师给出了98分全班第一的分数，并进行了课堂展示。"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">本作品来自我本科二年级时选修公选课“家居生活美学”所布置的一次作业，要求使用波普艺术进行创作，不限题材。老师给出了98分全班第一的分数，并进行了课堂展示。</span></span></h3><div class="notion-text notion-block-2ec00c660d2780139330ea4fda2eb811">完成时间：2024.05.21 20:00 - 2024.05.27 23:55</div></div></div><div class="notion-row notion-block-35b00c660d278038b3f8c0c2c4ff8eb3"><div class="notion-column notion-block-35b00c660d278061ae75e611e6a90711" style="width:calc((100% - (1 * min(32px, 4vw))) * 0.5)"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-35b00c660d27807a9e0dddc6c77c6184"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://cloudflarecnimg.scdn.io/i/69ff70bfc72df_1778348223.webp?spaceId=04100c66-0d27-816d-a256-0003e67093bb&amp;t=35b00c66-0d27-807a-9e0d-ddc6c77c6184" alt="notion image" loading="lazy" decoding="async"/></div></figure></div><div class="notion-spacer"></div><div class="notion-column notion-block-35b00c660d27809c8e9ac268cd294736" style="width:calc((100% - (1 * min(32px, 4vw))) * 0.5)"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-35b00c660d27802c9f11f8fd6ba2b1b1"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://cloudflarecnimg.scdn.io/i/69ff70c337ebf_1778348227.webp?spaceId=04100c66-0d27-816d-a256-0003e67093bb&amp;t=35b00c66-0d27-802c-9f11-f8fd6ba2b1b1" alt="notion image" loading="lazy" decoding="async"/></div></figure></div><div class="notion-spacer"></div></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-35b00c660d278087b728ea9bf40049b4"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://cloudflarecnimg.scdn.io/i/69ff70ce4826b_1778348238.webp?spaceId=04100c66-0d27-816d-a256-0003e67093bb&amp;t=35b00c66-0d27-8087-b728-ea9bf40049b4" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-35b00c660d27807784b1f266a629d111"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[2026.03.12]]></title>
            <link>intro/article/diary1</link>
            <guid>intro/article/diary1</guid>
            <pubDate>Thu, 12 Mar 2026 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-32100c660d2780ffa670da2777bb4f59"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-callout notion-gray_background_co notion-block-32100c660d2780139274f5c6c259c983"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="🌳">🌳</span></div><div class="notion-callout-text">又是一年植树节，感觉这一个节日平淡的几乎快要被遗忘，不知道当时在高中种下的那棵树还好吗？有没有存活下去呢？

对于处于大三下的我来说，节日就像千千万万的普通日子一样，在我的身边流过，无论悲喜。我依旧困扰在优绩、人情的压力中，迷茫在不确定的未来思考里。

今天有一个重要的验证，我的确是一个需要环境鞭策的条件自律者，所以寝室这样的地点并不是我理想的自习室。我又要开始图书馆、食堂、寝室三点一线的生活了。

理想在现实的击打下，似乎永远处于劣势，但我会让它们在未来的某一天熠熠生辉。</div></div><div class="notion-blank notion-block-32100c660d27809a923bf2c6cf7ef5a6"> </div><div class="notion-blank notion-block-32100c660d2780b79df7d00ccde6f174"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[深度学习1-进入金丹期]]></title>
            <link>intro/article/dl1</link>
            <guid>intro/article/dl1</guid>
            <pubDate>Mon, 19 Jan 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[从零开始的深度学习炼丹生活]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-2ed00c660d27802e9e47e3b46b70ed94"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-text notion-block-2ed00c660d278050a970dd0838b7b829">本系列使用教材</div><div class="notion-callout notion-gray_background_co notion-block-2ed00c660d27804aadeafcec65104041"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2ed00c660d278020a970ed48a3ebe183"><a class="notion-link" href="https://zh-v2.d2l.ai/" target="_blank" rel="noopener noreferrer">《动手学深度学习》pytorch版</a></div></div></div><div class="notion-text notion-block-2ed00c660d2780f7a451d08cc8bc6301">对应网课</div><div class="notion-callout notion-gray_background_co notion-block-2ed00c660d2780cfa0c1e31769e8971a"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2ed00c660d2780c2a016d52e2f10e845"><a class="notion-link" href="https://space.bilibili.com/1567748478/lists/358497?type=series" target="_blank" rel="noopener noreferrer">跟李沐学AI-动手学深度学习</a></div></div></div><div class="notion-text notion-block-2ed00c660d2780da92adde806bd455ca">我的文章是对上述内容的精简表述，是我个人学习过程中的思考</div><div class="notion-text notion-block-2f700c660d2780a2bf30f84c848843f2">其余几期：</div><div class="notion-text notion-block-2f700c660d2780afaeb6c20a5c3ada62"><span class="notion-teal_background"><b><a class="notion-link" href="https://www.86601125.xyz/article/dl2" target="_blank" rel="noopener noreferrer">深度学习2-预备知识_线性网络_多层感知机</a></b></span></div><div class="notion-text notion-block-2f700c660d2780859289ce622ac6e6e7"><span class="notion-teal_background"><b><a class="notion-link" href="https://www.86601125.xyz/article/dl3" target="_blank" rel="noopener noreferrer">深度学习3-deepzard网课1 </a></b></span></div><div class="notion-text notion-block-2f700c660d27804bb0d9d82ad575d58a"><span class="notion-teal_background"><b><a class="notion-link" href="https://www.86601125.xyz/article/dl4" target="_blank" rel="noopener noreferrer">深度学习4-deepzard网课2 </a></b></span></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2ed00c660d27801094b8fc01b2bd375e" data-id="2ed00c660d27801094b8fc01b2bd375e"><span><div id="2ed00c660d27801094b8fc01b2bd375e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27801094b8fc01b2bd375e" title="开始"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">开始</span></span></h2><details class="notion-toggle notion-block-2ed00c660d2780ca8637d0f10d999c7c"><summary><b>教程路线（展开阅读）</b></summary><div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2ed00c660d2780b3864ac3807b68308f"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:549px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Aede26bed-a176-4d16-a70e-246a7abec60d%3Aimage.png?table=block&amp;id=2ed00c66-0d27-80b3-864a-c3807b68308f&amp;t=2ed00c66-0d27-80b3-864a-c3807b68308f" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-teal_background notion-block-2ed00c660d278007a68ccdb801697eea">我的路线：</div><div class="notion-text notion-block-2ed00c660d2780ed9a8ee4000966a77f">基础</div><div class="notion-to-do notion-block-2ed00c660d278044a009d8339c535eb2"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">前言</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2ed00c660d27800b8471c9375f90530b"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">预备知识</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2ed00c660d27809e93a4e1646780ac27"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">线性神经网络</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2ed00c660d2780a9bc80c884a6867542"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">多层感知机</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2ed00c660d278035b1f6fd531ada5cb1"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">优化算法</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2ed00c660d2780daa11cfdfd51094528"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">深度学习计算</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2ed00c660d27800d9104c52baf6c5983"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">计算性能</div></div><div class="notion-to-do-children"></div></div><div class="notion-text notion-block-2ed00c660d27806a8758ea90fd51f76f">进阶</div><div class="notion-to-do notion-block-2ed00c660d2780bb8e0ef1f65eac634e"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">卷积神经网络</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2ed00c660d2780038806c4dba8147a87"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">现代卷积神经网络</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2ed00c660d27804c97f7dc433be5fd3b"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">注意力机制</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2ed00c660d2780eea5adfe9a36771ad3"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">计算机视觉</div></div><div class="notion-to-do-children"></div></div></div></details><details class="notion-toggle notion-block-2ed00c660d27804991e0f06ba8badf63"><summary><b>环境安装（展开阅读）</b></summary><div><ol start="1" class="notion-list notion-list-numbered notion-block-2ed00c660d2780d49c58d63587814a76" style="list-style-type:decimal"><li>安装 miniconda</li><ol class="notion-list notion-list-numbered notion-block-2ed00c660d2780d49c58d63587814a76" style="list-style-type:lower-alpha"><div class="notion-callout notion-gray_background_co notion-block-2ed00c660d2780609155df73c135dafe"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2ed00c660d2780ba8afbc25a12279820"><a class="notion-link" href="https://www.anaconda.com/download/success" target="_blank" rel="noopener noreferrer">miniconda 下载网址</a></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2ed00c660d27804cab2ae772f3542a0a"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Aa405b8d1-508b-4448-ab5b-3118c47ad781%3Aimage.png?table=block&amp;id=2ed00c66-0d27-804c-ab2a-e772f3542a0a&amp;t=2ed00c66-0d27-804c-ab2a-e772f3542a0a" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2ed00c660d2780ef877fe75987f2fddb"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A274aab1a-b848-406f-a75c-9e4ae248ac21%3Aimage.png?table=block&amp;id=2ed00c66-0d27-80ef-877f-e75987f2fddb&amp;t=2ed00c66-0d27-80ef-877f-e75987f2fddb" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2ed00c660d2780b39a46c5a8aae56099">建议C盘之外的位置</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2ed00c660d2780968905fca151c8d043"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A2e10c456-97e5-4eef-9fb4-21ce9f3c995b%3Aimage.png?table=block&amp;id=2ed00c66-0d27-8096-8905-fca151c8d043&amp;t=2ed00c66-0d27-8096-8905-fca151c8d043" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2ed00c660d27804e9b25e1a008488785">如果你电脑有单独安装的python，建议卸载，然后勾选这三个选项，以后只用miniconda的python即可</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2ed00c660d278096b30ced688b986191"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Ab2aa06b4-907e-477b-ad19-6adc1c31200b%3Aimage.png?table=block&amp;id=2ed00c66-0d27-8096-b30c-ed688b986191&amp;t=2ed00c66-0d27-8096-b30c-ed688b986191" alt="notion image" loading="lazy" decoding="async"/></div></figure></div></div></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2ed00c660d2780ec8da2c6e4325cff9f" style="list-style-type:decimal"><li>创建<b>新环境</b>，安装<b>gpu版本pytorch</b>，安装<b>教程提供的软件库</b></li><ol class="notion-list notion-list-numbered notion-block-2ed00c660d2780ec8da2c6e4325cff9f" style="list-style-type:lower-alpha"><div class="notion-callout notion-gray_background_co notion-block-2ed00c660d278033a59ac6e69dd6f046"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2ed00c660d2780248b30d633a0988d50">用cmd、powershell、anaconda prompt 打开均可</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2ed00c660d278044a6d4db74b24fcd2b"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A4545b7c0-2ee8-4e41-a57d-0b1927ad7f70%3Aimage.png?table=block&amp;id=2ed00c66-0d27-8044-a6d4-db74b24fcd2b&amp;t=2ed00c66-0d27-8044-a6d4-db74b24fcd2b" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2ed00c660d278033ae6ef80328ad13a8">依次输入以下命令：</div><div class="notion-to-do notion-block-2ed00c660d27809682fbe2d5054ee379"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">conda create -n dl2 python=3.9 -y</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2ed00c660d27803aa3cfcca3f04eef6d"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">conda activate dl2</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2ed00c660d2780d8917ae04c56676cb7"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">conda install pytorch==2.0.0 torchvision==0.15.0 torchaudio==2.0.0 pytorch-cuda=11.8 -c pytorch -c nvidia</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2ed00c660d27802ea8ded038bee9c841"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">pip install d2l==1.0.3</div></div><div class="notion-to-do-children"></div></div></div></div></ol></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2ed00c660d2780fe9175f1b25ca0d97b" style="list-style-type:decimal"><li>下载教程提供的代码</li><ol class="notion-list notion-list-numbered notion-block-2ed00c660d2780fe9175f1b25ca0d97b" style="list-style-type:lower-alpha"><div class="notion-text notion-block-2ed00c660d2780c3b52afe88a9ab5641">下载网址：<a class="notion-link" href="https://zh-v2.d2l.ai/d2l-zh.zip" target="_blank" rel="noopener noreferrer">https://zh-v2.d2l.ai/d2l-zh.zip</a></div><div class="notion-text notion-block-2ed00c660d278023950dcc73ff3fc24f">之后解压在你容易找到的地方，建议C盘以外</div><div class="notion-text notion-block-2ed00c660d2780bc82b5c624e0e56e18">pytorch 文件夹即本教程代码文件夹</div><div class="notion-callout notion-gray_background_co notion-block-2ed00c660d27809ba498da74c6a96305"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2ed00c660d2780e9b534ed171531610b"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A28c1f4e1-6572-426b-a543-f7a13cbc9a03%3Aimage.png?table=block&amp;id=2ed00c66-0d27-80e9-b534-ed171531610b&amp;t=2ed00c66-0d27-80e9-b534-ed171531610b" alt="notion image" loading="lazy" decoding="async"/></div></figure></div></div></ol></ol></div></details><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2ed00c660d278081b1cecf6581f1ae02" data-id="2ed00c660d278081b1cecf6581f1ae02"><span><div id="2ed00c660d278081b1cecf6581f1ae02" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278081b1cecf6581f1ae02" title="前言"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">前言</span></span></h2><blockquote class="notion-quote notion-block-2ed00c660d27809ea11ef3beb5f5d9d4"><div>机器学习 = 不写“规则”，而是让电脑从数据里学规则</div></blockquote><div class="notion-text notion-block-2ed00c660d2780bcad8bd80ceb2c635b">普通编程：</div><div class="notion-text notion-block-2ed00c660d2780acb5e9c7f2608f61b3">机器学习：</div><hr class="notion-hr notion-block-2ed00c660d2780309dd2c3e70a2976a3"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2ed00c660d278003b4c4dbcf051d3ac1" data-id="2ed00c660d278003b4c4dbcf051d3ac1"><span><div id="2ed00c660d278003b4c4dbcf051d3ac1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278003b4c4dbcf051d3ac1" title="一、为什么需要机器学习？"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">一、为什么需要机器学习？</span></span></h3><div class="notion-text notion-block-2ed00c660d27806bae16c874456d3bb2">比如，对 Siri 说 “Hey Siri” 来唤醒它，这是一个<span class="notion-yellow_background"><b>机器学习的实际运用</b></span></div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2ed00c660d278080af28eb3754a33df2" data-id="2ed00c660d278080af28eb3754a33df2"><span><div id="2ed00c660d278080af28eb3754a33df2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278080af28eb3754a33df2" title="1️⃣ 如果不用机器学习，会怎样？"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1️⃣ 如果不用机器学习，会怎样？</span></span></h4><div class="notion-text notion-block-2ed00c660d278039ac0ef7c21fe91c47">问题：</div><blockquote class="notion-quote notion-block-2ed00c660d278014b5bbdaf5f99e441b"><div>写一个程序，判断一段声音里有没有 “Hey Siri”</div></blockquote><div class="notion-text notion-block-2ed00c660d278058ac5cdbae9371aa48">你会发现：</div><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780b0a25ac81b9f515791"><li>麦克风输入的是 <b>每秒 4 万多个数字</b></li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d27806d9c48e69f477da121"><li>代码规则无法描述 “Hey Siri” 这句话：</li><ul class="notion-list notion-list-disc notion-block-2ed00c660d27806d9c48e69f477da121"><div class="notion-text notion-block-2ed00c660d27806a863bea218d20258e">👉 因为“像”没法用代码描述</div></ul></ul><div class="notion-text notion-block-2ed00c660d2780da9818eddf57db15a9"><b>结论</b>：</div><div class="notion-text notion-block-2ed00c660d278079a24df0b074b2fb62">👉 <b>规则写不出来，只能让机器自己学</b></div><hr class="notion-hr notion-block-2ed00c660d2780ee86e9c282769ac8f1"/><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2ed00c660d2780f1a31dfcc6835eceed" data-id="2ed00c660d2780f1a31dfcc6835eceed"><span><div id="2ed00c660d2780f1a31dfcc6835eceed" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780f1a31dfcc6835eceed" title="2️⃣ 人是怎么做到的？"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2️⃣ 人是怎么做到的？</span></span></h4><div class="notion-text notion-block-2ed00c660d2780189378f65334f4ab6b">人学了英语，能听出 “Hey Siri”</div><div class="notion-text notion-block-2ed00c660d27803b8e26d9c5df4c6319">说明：</div><blockquote class="notion-quote notion-block-2ed00c660d27805f8a3bc7d639cd67b6"><div>这个任务是“能学会的”，但“不知道怎么教”</div></blockquote><div class="notion-text notion-block-2ed00c660d2780af8a6cd8a33d5bba73">机器学习正是用来解决这种问题的。</div><hr class="notion-hr notion-block-2ed00c660d27807da982f633e03c748d"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2ed00c660d2780559c1fce4e601aa5bb" data-id="2ed00c660d2780559c1fce4e601aa5bb"><span><div id="2ed00c660d2780559c1fce4e601aa5bb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780559c1fce4e601aa5bb" title="二、机器学习到底在“学”什么？"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">二、机器学习到底在“学”什么？</span></span></h3><blockquote class="notion-quote notion-block-2ed00c660d2780e8ab23e494777f0b44"><div>模型 = 一个有很多旋钮的机器</div></blockquote><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780838ef8fb2b9113c1e7"><li>旋钮 = <span class="notion-red"><span class="notion-yellow_background">参数</span></span>（parameter）</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780e386ddfb6535f923f5"><li>不同旋钮位置 → 不同表现</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780dba37ae471662dabf9"><li>旋钮<span class="notion-red"><span class="notion-yellow_background">调对了</span></span> → 机器就“聪明了”</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d27803b93b8eeb533038627"><li>让旋钮不断接近正确的位置 → 这个过程就是<span class="notion-red"><span class="notion-yellow_background">学习</span></span></li></ul><hr class="notion-hr notion-block-2ed00c660d278090b306d3ffde8fb45d"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2ed00c660d27805bb98ce945a01c9203" data-id="2ed00c660d27805bb98ce945a01c9203"><span><div id="2ed00c660d27805bb98ce945a01c9203" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27805bb98ce945a01c9203" title="三、机器学习是怎么“训练”的？"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">三、机器学习是怎么“训练”的？</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2ed00c660d278091b00fd230768e3da3" data-id="2ed00c660d278091b00fd230768e3da3"><span><div id="2ed00c660d278091b00fd230768e3da3" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278091b00fd230768e3da3" title="训练流程"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">训练流程</span></span></h4><hr class="notion-hr notion-block-2ed00c660d2780c58346cf7b8c9e7089"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2ed00c660d27808d8d14d6a5cfc2d010" data-id="2ed00c660d27808d8d14d6a5cfc2d010"><span><div id="2ed00c660d27808d8d14d6a5cfc2d010" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27808d8d14d6a5cfc2d010" title="四、机器学习的 4 个必备零件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">四、机器学习的 4 个必备零件</span></span></h3><blockquote class="notion-quote notion-block-2ed00c660d2780ac84c0f05d919d3a2d"><div>任何机器学习问题，都离不开这 4 个</div></blockquote><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2ed00c660d278084b13efd60051c6ce5" data-id="2ed00c660d278084b13efd60051c6ce5"><span><div id="2ed00c660d278084b13efd60051c6ce5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278084b13efd60051c6ce5" title="1️⃣ 数据（data）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1️⃣ 数据（data）</span></span></h4><div class="notion-text notion-block-2ed00c660d2780b5b397e290178436d6">术语翻译表：</div><table class="notion-simple-table notion-block-2ed00c660d2780469e15fbbc108b686e"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-2ed00c660d2780f497d5e9a302a89ea7"><td class="" style="width:120px"><div class="notion-simple-table-cell">术语</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">白话</div></td></tr><tr class="notion-simple-table-row notion-block-2ed00c660d2780339648fb9714d4fd68"><td class="" style="width:120px"><div class="notion-simple-table-cell">样本</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">一条数据</div></td></tr><tr class="notion-simple-table-row notion-block-2ed00c660d2780f98cf7e903f8b9585d"><td class="" style="width:120px"><div class="notion-simple-table-cell">特征</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">输入信息</div></td></tr><tr class="notion-simple-table-row notion-block-2ed00c660d2780eb9b65dfa7a591ef2e"><td class="" style="width:120px"><div class="notion-simple-table-cell">标签</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">正确答案</div></td></tr></tbody></table><hr class="notion-hr notion-block-2ed00c660d2780d19562e9714758cdf2"/><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2ed00c660d278064b908ccf3fee6356f" data-id="2ed00c660d278064b908ccf3fee6356f"><span><div id="2ed00c660d278064b908ccf3fee6356f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278064b908ccf3fee6356f" title="2️⃣ 模型（model）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2️⃣ 模型（model）</span></span></h4><blockquote class="notion-quote notion-block-2ed00c660d278006b445d75e4f61c879"><div>模型 = 把输入变成输出的函数</div></blockquote><div class="notion-text notion-block-2ed00c660d2780bc82c5f25b72fd89f9">你可以理解为：</div><div class="notion-text notion-block-2ed00c660d278065af7feba7f74ffdf3">深度学习的模型：</div><ul class="notion-list notion-list-disc notion-block-2ed00c660d278021bb68ceda7280cc5c"><li>很复杂</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780ab860fca3d6b340d59"><li>参数很多</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d27809e87c6d3b83eb1b43e"><li>本质还是：<b>输入 → 输出</b></li></ul><hr class="notion-hr notion-block-2ed00c660d27800c9c49f41fc0f97d72"/><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2ed00c660d27805c821bf9e0a306b02d" data-id="2ed00c660d27805c821bf9e0a306b02d"><span><div id="2ed00c660d27805c821bf9e0a306b02d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27805c821bf9e0a306b02d" title="3️⃣ 目标函数 / 损失函数（loss）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3️⃣ 目标函数 / 损失函数（loss）</span></span></h4><blockquote class="notion-quote notion-block-2ed00c660d278074ac75f5587b813b0d"><div><b>用一个数字，衡量“你错得有多离谱”</b></div></blockquote><ul class="notion-list notion-list-disc notion-block-2ed00c660d278056b905d2bf767a2219"><li>预测得准 → 损失小</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d27803cae12f8b787172bb8"><li>预测得离谱 → 损失大</li></ul><div class="notion-text notion-block-2ed00c660d27803aae1be3b16b1cf78d">例子：</div><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780268cd1d682332cbfd4"><li>预测 10，真实是 12 → 错一点</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d27809abfcaf63c31355dd6"><li>预测 0，真实是 12 → 错很多</li></ul><div class="notion-text notion-block-2ed00c660d27809a81ace7de20a9df01">📌 <b>训练的目标：</b></div><blockquote class="notion-quote notion-block-2ed00c660d27802f97d7f8148125a6d3"><div>让损失尽量小</div></blockquote><hr class="notion-hr notion-block-2ed00c660d27803b9b69f5487bb1ed02"/><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2ed00c660d278002a6bee4bfb2d5c2ca" data-id="2ed00c660d278002a6bee4bfb2d5c2ca"><span><div id="2ed00c660d278002a6bee4bfb2d5c2ca" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278002a6bee4bfb2d5c2ca" title="4️⃣ 优化算法（optimizer）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">4️⃣ 优化算法（optimizer）</span></span></h4><blockquote class="notion-quote notion-block-2ed00c660d2780b98089c5864a4f5248"><div>教电脑“该怎么调旋钮”</div></blockquote><div class="notion-text notion-block-2ed00c660d27809da352c9444b21f96c">最常见的叫：</div><blockquote class="notion-quote notion-block-2ed00c660d27802b94dbe5e5e7d872b1"><div>梯度下降 = 朝着“让错误变小的方向”慢慢调</div></blockquote><div class="notion-text notion-block-2ed00c660d2780298349e52782711cf8">只需记住：</div><blockquote class="notion-quote notion-block-2ed00c660d27801384e2f948ef572bed"><div>它负责自动调参数，不用管细节</div></blockquote><hr class="notion-hr notion-block-2ed00c660d2780f1b51bf23a2d40e816"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2ed00c660d27809eaa39d7eaae7c6c11" data-id="2ed00c660d27809eaa39d7eaae7c6c11"><span><div id="2ed00c660d27809eaa39d7eaae7c6c11" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27809eaa39d7eaae7c6c11" title="五、常见的机器学习问题类型（学习的是哪一类题）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">五、常见的机器学习问题类型（学习的是哪一类题）</span></span></h3><div class="notion-text notion-block-2ed00c660d2780ec98f7c970d8781211">到目前为止已经知道：</div><blockquote class="notion-quote notion-block-2ed00c660d2780b9ace8fc819a577300"><div>机器学习 = 数据 + 模型 + 损失 + 优化</div></blockquote><div class="notion-text notion-block-2ed00c660d278043be5dff5e2924c99b">那<b>这些东西是用来干嘛的？</b></div><div class="notion-text notion-block-2ed00c660d2780d9afa1c5fc80505062">答案是：</div><div class="notion-text notion-block-2ed00c660d27804da879e5b029195111">👉 <b>解决不同类型的问题</b></div><div class="notion-text notion-block-2ed00c660d2780a3b239fc5b17e6543e">下面是你现在<b>必须认识的几类问题</b>，不用记公式，只记“场景 + 关键词”。</div><div class="notion-to-do notion-block-2ed00c660d278011b397f8150d1606bd"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">监督学习</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2ed00c660d27809ca987de426766bfea"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">无监督学习</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2ed00c660d2780f5b80de3cfe393bf68"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">强化学习</div></div><div class="notion-to-do-children"></div></div><hr class="notion-hr notion-block-2ed00c660d27808ca4dfcbb528e7371b"/><details class="notion-toggle notion-block-2ed00c660d2780a79e26eae775e7c621"><summary><span class="notion-teal_background"><b>监督学习（最重要、最常用）（展开阅读）</b></span></summary><div><div class="notion-to-do notion-block-2ed00c660d278057b6ebc5fd48c45882"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">回归（有多少）</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2ed00c660d278083bda1fef4c25e5a5f"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">分类（是什么）</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2ed00c660d278062bc23fff7182470f5"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">多标签分类</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2ed00c660d27800b9a96f1f87c8a0716"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">搜索排序</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2ed00c660d2780e1b3f5fc4d31fa2521"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">推荐</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2ed00c660d278017be08f99a45e4db56"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">序列</div></div><div class="notion-to-do-children"></div></div><h4 class="notion-h notion-h3 notion-block-2ed00c660d2780efaf59c8680c19c324" data-id="2ed00c660d2780efaf59c8680c19c324"><span><div id="2ed00c660d2780efaf59c8680c19c324" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780efaf59c8680c19c324" title="定义"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">定义</span></span></h4><blockquote class="notion-quote notion-block-2ed00c660d2780d283c0d7e6cf035246"><div><span class="notion-red"><span class="notion-yellow_background">有标准答案</span></span>的数据，学“输入 → 输出”</div></blockquote><div class="notion-text notion-block-2ed00c660d2780adbad7ce247e5d847e">也就是说：</div><h4 class="notion-h notion-h3 notion-block-2ed00c660d2780e09e87f4e8d2824cc7" data-id="2ed00c660d2780e09e87f4e8d2824cc7"><span><div id="2ed00c660d2780e09e87f4e8d2824cc7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780e09e87f4e8d2824cc7" title="监督学习的固定流程（一定要记住）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">监督学习的固定流程（一定要记住）</span></span></h4><h3 class="notion-h notion-h2 notion-block-2ed00c660d27802c84e2c4dac2b85a71" data-id="2ed00c660d27802c84e2c4dac2b85a71"><span><div id="2ed00c660d27802c84e2c4dac2b85a71" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27802c84e2c4dac2b85a71" title="回归"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-purple"><span class="notion-pink_background"><b>回归</b></span></span></span></span></h3><h4 class="notion-h notion-h3 notion-block-2ed00c660d278005b52bedb2e3c780ad" data-id="2ed00c660d278005b52bedb2e3c780ad"><span><div id="2ed00c660d278005b52bedb2e3c780ad" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278005b52bedb2e3c780ad" title="核心特征"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">核心特征</span></span></h4><blockquote class="notion-quote notion-block-2ed00c660d2780a3b2dafa4294b2d06f"><div>预测的是“一个数”</div></blockquote><div class="notion-text notion-block-2ed00c660d2780bfbe19fafa65e14849">关键词判断法：</div><blockquote class="notion-quote notion-block-2ed00c660d27800fbd4bce1e19d0028e"><div>凡是问「有多少」的，几乎都是回归</div></blockquote><h4 class="notion-h notion-h3 notion-block-2ed00c660d2780b7ad68c90757b30577" data-id="2ed00c660d2780b7ad68c90757b30577"><span><div id="2ed00c660d2780b7ad68c90757b30577" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780b7ad68c90757b30577" title="常见例子"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">常见例子</span></span></h4><ul class="notion-list notion-list-disc notion-block-2ed00c660d27800c867ec9eb45d8b25b"><li>房价多少钱</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d27806189e3c279e6630a18"><li>电影评分是多少</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780ec9bb1dad285e2ac59"><li>手术需要几小时</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d27800c9f6afdfdae55f27a"><li>明天会下<span class="notion-red"><span class="notion-yellow_background">多少</span></span>雨</li></ul><div class="notion-text notion-block-2ed00c660d2780119e8dcd7afa283563">📌 输出是 <b>连续数值</b>，不是选项</div><hr class="notion-hr notion-block-2ed00c660d2780bca10fcdd7b987d411"/><div class="notion-text notion-block-2ed00c660d2780f595e3e46ee233f612">生活中的回归问题：修水管</div><div class="notion-text notion-block-2ed00c660d278046a9b6f0962034bfab">这就是最经典的：👉 <b>线性回归</b></div><hr class="notion-hr notion-block-2ed00c660d2780c1b207eb0c1a0b7ca2"/><h3 class="notion-h notion-h2 notion-block-2ed00c660d278028a43fff151738908b" data-id="2ed00c660d278028a43fff151738908b"><span><div id="2ed00c660d278028a43fff151738908b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278028a43fff151738908b" title="分类"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-purple"><span class="notion-pink_background">分类</span></span></span></span></h3><h4 class="notion-h notion-h3 notion-block-2ed00c660d2780c39b06d4ce64dd0286" data-id="2ed00c660d2780c39b06d4ce64dd0286"><span><div id="2ed00c660d2780c39b06d4ce64dd0286" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780c39b06d4ce64dd0286" title="核心特征"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">核心特征</span></span></h4><blockquote class="notion-quote notion-block-2ed00c660d27809d8339f7368aeec297"><div>回答“是哪一个 / 是不是”</div></blockquote><h4 class="notion-h notion-h3 notion-block-2ed00c660d27803dac89f5e47a98a838" data-id="2ed00c660d27803dac89f5e47a98a838"><span><div id="2ed00c660d27803dac89f5e47a98a838" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27803dac89f5e47a98a838" title="分类 vs 回归（对比理解）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">分类 vs 回归（对比理解）</span></span></h4><table class="notion-simple-table notion-block-2ed00c660d27805fb88bd06210a9a551"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-2ed00c660d27809cb597f8ddf4845f2b"><td class="" style="width:120px"><div class="notion-simple-table-cell">问题</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">类型</div></td></tr><tr class="notion-simple-table-row notion-block-2ed00c660d2780c6ac1cfd25ede5467c"><td class="" style="width:120px"><div class="notion-simple-table-cell">房价多少钱</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">回归</div></td></tr><tr class="notion-simple-table-row notion-block-2ed00c660d2780d78435c896f16fc01c"><td class="" style="width:120px"><div class="notion-simple-table-cell">是不是猫</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">分类</div></td></tr><tr class="notion-simple-table-row notion-block-2ed00c660d27804f98e8ccad21c80cdc"><td class="" style="width:120px"><div class="notion-simple-table-cell">是数字几</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">分类</div></td></tr></tbody></table><hr class="notion-hr notion-block-2ed00c660d2780488529cdc2afba5b8b"/><h4 class="notion-h notion-h3 notion-block-2ed00c660d2780a98b0cd2337c771796" data-id="2ed00c660d2780a98b0cd2337c771796"><span><div id="2ed00c660d2780a98b0cd2337c771796" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780a98b0cd2337c771796" title="分类的三种常见形式"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">分类的三种常见形式</span></span></h4><h4 class="notion-h notion-h3 notion-block-2ed00c660d2780e68a1fd8984da964ff" data-id="2ed00c660d2780e68a1fd8984da964ff"><span><div id="2ed00c660d2780e68a1fd8984da964ff" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780e68a1fd8984da964ff" title="① 二分类"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">① 二分类</span></span></h4><ul class="notion-list notion-list-disc notion-block-2ed00c660d278034a391fd86cbe2ac36"><li>是 / 否</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780d4976ef4695a039163"><li>猫 / 狗</li></ul><h4 class="notion-h notion-h3 notion-block-2ed00c660d27806f97c5f709cbe42b88" data-id="2ed00c660d27806f97c5f709cbe42b88"><span><div id="2ed00c660d27806f97c5f709cbe42b88" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27806f97c5f709cbe42b88" title="② 多分类"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">② 多分类</span></span></h4><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780c2a461ccc4376c4b25"><li>数字 0–9</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780778d4ef21c8225c113"><li>商品类别</li></ul><h4 class="notion-h notion-h3 notion-block-2ed00c660d278014b3bbeaaf4c228a92" data-id="2ed00c660d278014b3bbeaaf4c228a92"><span><div id="2ed00c660d278014b3bbeaaf4c228a92" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278014b3bbeaaf4c228a92" title="③ 概率输出（很重要）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">③ 概率输出（很重要）</span></span></h4><div class="notion-text notion-block-2ed00c660d27801bb4dbe30a2bb9e0f6">模型往往会说：</div><hr class="notion-hr notion-block-2ed00c660d27803c98f5de2443b9c42b"/><h3 class="notion-h notion-h2 notion-block-2ed00c660d2780858175dc49a8658ac2" data-id="2ed00c660d2780858175dc49a8658ac2"><span><div id="2ed00c660d2780858175dc49a8658ac2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780858175dc49a8658ac2" title="分类的多标签问题（不是只能选一个）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-purple"><span class="notion-pink_background">分类的多标签问题（不是只能选一个）</span></span></span></span></h3><h4 class="notion-h notion-h3 notion-block-2ed00c660d278089a3b9f55ed509f9bc" data-id="2ed00c660d278089a3b9f55ed509f9bc"><span><div id="2ed00c660d278089a3b9f55ed509f9bc" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278089a3b9f55ed509f9bc" title="和普通分类的区别"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">和普通分类的区别</span></span></h4><ul class="notion-list notion-list-disc notion-block-2ed00c660d27801a8628d1b1bf6ac6bb"><li>分类：只能选 <b>一个</b></li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d27809e950fc66382daff81"><li>多标签：可以选 <b>多个</b></li></ul><h4 class="notion-h notion-h3 notion-block-2ed00c660d278007aaf5c6e45d8cb596" data-id="2ed00c660d278007aaf5c6e45d8cb596"><span><div id="2ed00c660d278007aaf5c6e45d8cb596" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278007aaf5c6e45d8cb596" title="例子"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">例子</span></span></h4><ul class="notion-list notion-list-disc notion-block-2ed00c660d278048b6becc8feecf1d4e"><li>TerryDuckPool网站包含多个标签：</li><ul class="notion-list notion-list-disc notion-block-2ed00c660d278048b6becc8feecf1d4e"><li>编程基础</li><li>艺术创作</li><li>胡思乱想</li></ul></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d278024920ff38c8c548769"><li>一张图：</li><ul class="notion-list notion-list-disc notion-block-2ed00c660d278024920ff38c8c548769"><li>有猫</li><li>有狗</li><li>有人</li></ul></ul><div class="notion-text notion-block-2ed00c660d278027b6c5f92418f2afbe">📌 <b>标签之间不互斥</b></div><hr class="notion-hr notion-block-2ed00c660d2780abb79fd458ae5097d1"/><h3 class="notion-h notion-h2 notion-block-2ed00c660d27806884d2ff7876ae31df" data-id="2ed00c660d27806884d2ff7876ae31df"><span><div id="2ed00c660d27806884d2ff7876ae31df" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27806884d2ff7876ae31df" title="搜索 / 排序问题（不是选，而是排顺序）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-purple"><span class="notion-pink_background">搜索 / 排序问题（不是选，而是排顺序）</span></span></span></span></h3><h4 class="notion-h notion-h3 notion-block-2ed00c660d2780b797dec4e361e3305e" data-id="2ed00c660d2780b797dec4e361e3305e"><span><div id="2ed00c660d2780b797dec4e361e3305e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780b797dec4e361e3305e" title="核心目标"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">核心目标</span></span></h4><blockquote class="notion-quote notion-block-2ed00c660d2780358159fd4fd12afd64"><div>把一堆东西排个顺序</div></blockquote><div class="notion-text notion-block-2ed00c660d27806e9446c0125d192637">比如：</div><ul class="notion-list notion-list-disc notion-block-2ed00c660d278046af80f24cca6e88c8"><li>搜索引擎结果</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d278013b305d4a5deed7b07"><li>商品排序</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d27802abc7dc6d7650ee018"><li>推荐列表顺序</li></ul><hr class="notion-hr notion-block-2ed00c660d27800e9aadd73295341514"/><h3 class="notion-h notion-h2 notion-block-2ed00c660d27801d9bd7d7cc02e8831d" data-id="2ed00c660d27801d9bd7d7cc02e8831d"><span><div id="2ed00c660d27801d9bd7d7cc02e8831d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27801d9bd7d7cc02e8831d" title="6️⃣推荐系统（搜索的“个性化版本”）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">6️⃣<span class="notion-purple"><span class="notion-pink_background">推荐系统（搜索的“个性化版本”）</span></span></span></span></h3><h4 class="notion-h notion-h3 notion-block-2ed00c660d27809fa1f7d9a60ef2cbf8" data-id="2ed00c660d27809fa1f7d9a60ef2cbf8"><span><div id="2ed00c660d27809fa1f7d9a60ef2cbf8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27809fa1f7d9a60ef2cbf8" title="一句话理解"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">一句话理解</span></span></h4><blockquote class="notion-quote notion-block-2ed00c660d27808b9271d36a1f608add"><div>给“这个用户”推荐“他可能喜欢的东西”，按照分数进行排序</div></blockquote><h4 class="notion-h notion-h3 notion-block-2ed00c660d2780adb2a7ec633849cc31" data-id="2ed00c660d2780adb2a7ec633849cc31"><span><div id="2ed00c660d2780adb2a7ec633849cc31" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780adb2a7ec633849cc31" title="常见场景"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">常见场景</span></span></h4><ul class="notion-list notion-list-disc notion-block-2ed00c660d278076ac1ce30b07c40935"><li>电影推荐</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d27807e962ef0cc48a5864c"><li>商品推荐</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d278010b23de1c3ff356c41"><li>新闻推荐</li></ul><h4 class="notion-h notion-h3 notion-block-2ed00c660d2780d8b9cececa4aab5efe" data-id="2ed00c660d2780d8b9cececa4aab5efe"><span><div id="2ed00c660d2780d8b9cececa4aab5efe" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780d8b9cececa4aab5efe" title="推荐系统在做什么？"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">推荐系统在做什么？</span></span></h4><div class="notion-text notion-block-2ed00c660d27803c9c92f552ee0c7c19">本质是学一个函数：</div><div class="notion-text notion-block-2ed00c660d278087990def75f05b1068">然后：</div><hr class="notion-hr notion-block-2ed00c660d27803691d5c80b7c273b5a"/><h4 class="notion-h notion-h3 notion-block-2ed00c660d278003a6f4e2c72e783ff9" data-id="2ed00c660d278003a6f4e2c72e783ff9"><span><div id="2ed00c660d278003a6f4e2c72e783ff9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278003a6f4e2c72e783ff9" title="推荐系统的现实问题"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">推荐系统的现实问题</span></span></h4><ul class="notion-list notion-list-disc notion-block-2ed00c660d27800b8651f8469c66ac5e"><li>用户更爱给极端评分，导致<span class="notion-red"><span class="notion-yellow_background">某一类或几类信息</span></span>几乎垄断性地被推送</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780e9afb8c308e7b50da0"><li>推荐的信息又会影响用户行为和判断，导致他们更容易做出<span class="notion-red"><span class="notion-yellow_background">极端评价</span></span></li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d27800da9e1df4fd123d505"><li><span class="notion-yellow_background">极端评分</span> → <span class="notion-yellow_background">不合理推送</span> → <span class="notion-yellow_background">情绪极端</span>、<span class="notion-yellow_background">长期只接收特定信息</span> → <span class="notion-yellow_background">“信息茧房”</span></li></ul><div class="notion-text notion-block-2ed00c660d2780f99909f58c58fc3a54">📌 这也是现在仍在研究的问题</div><hr class="notion-hr notion-block-2ed00c660d2780eeb9c1c73f6a0f4cf0"/><h3 class="notion-h notion-h2 notion-block-2ed00c660d2780c2bc47c58aea670507" data-id="2ed00c660d2780c2bc47c58aea670507"><span><div id="2ed00c660d2780c2bc47c58aea670507" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780c2bc47c58aea670507" title="序列学习"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-purple"><span class="notion-pink_background">序列学习</span></span></span></span></h3><div class="notion-text notion-block-2ed00c660d2780b68d5feecadda7c84e"><span class="notion-red"><span class="notion-yellow_background"><b>前面的任务 输入 有共同点：</b></span></span></div><blockquote class="notion-quote notion-block-2ed00c660d2780949f72c9001970ed7b"><div>输入大小固定，互不相关</div></blockquote><div class="notion-text notion-block-2ed00c660d27805b8007ea21164e975c"><span class="notion-red"><span class="notion-yellow_background"><b>但现实中很多数据是：</b></span></span></div><ul class="notion-list notion-list-disc notion-block-2ed00c660d27806fb3b8e9b21a6c5b57"><li>有<span class="notion-yellow_background"><b>顺序</b></span>的</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d27805e9dfaec0619dcc70f"><li><span class="notion-yellow_background"><b>长度不一样</b></span>的</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780b99678d1aac94cf7e3"><li>前后<span class="notion-yellow_background"><b>有关联</b></span>的</li></ul><h4 class="notion-h notion-h3 notion-block-2ed00c660d2780529ab9d156757e8719" data-id="2ed00c660d2780529ab9d156757e8719"><span><div id="2ed00c660d2780529ab9d156757e8719" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780529ab9d156757e8719" title="序列学习典型例子"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">序列学习典型例子</span></span></h4><h4 class="notion-h notion-h3 notion-block-2ed00c660d278040a87ef983ba8c1f64" data-id="2ed00c660d278040a87ef983ba8c1f64"><span><div id="2ed00c660d278040a87ef983ba8c1f64" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278040a87ef983ba8c1f64" title="① 语音转文本"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">① 语音转文本</span></span></h4><h4 class="notion-h notion-h3 notion-block-2ed00c660d2780bebddbe3332e4fc38b" data-id="2ed00c660d2780bebddbe3332e4fc38b"><span><div id="2ed00c660d2780bebddbe3332e4fc38b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780bebddbe3332e4fc38b" title="② 机器翻译"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">② 机器翻译</span></span></h4><div class="notion-text notion-block-2ed00c660d278087a85fe9fdd4e2048f">📌 输入和输出：</div><ul class="notion-list notion-list-disc notion-block-2ed00c660d27805ca240da898a256638"><li><span class="notion-pink_background"><b>长度</b></span>可能不同</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d27801eab20f671051fa4b1"><li><span class="notion-pink_background"><b>顺序</b></span>可能不同</li></ul><hr class="notion-hr notion-block-2ed00c660d2780b8bddaf8def6ffd192"/><h3 class="notion-h notion-h2 notion-block-2ed00c660d2780d380efc4225f3b4a57" data-id="2ed00c660d2780d380efc4225f3b4a57"><span><div id="2ed00c660d2780d380efc4225f3b4a57" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780d380efc4225f3b4a57" title="理解监督学习任务"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">理解监督学习任务</span></span></h3><h4 class="notion-h notion-h3 notion-block-2ed00c660d2780c9aedbe5e0743095fc" data-id="2ed00c660d2780c9aedbe5e0743095fc"><span><div id="2ed00c660d2780c9aedbe5e0743095fc" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780c9aedbe5e0743095fc" title="给你一张超重要的速查表"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">给你一张<b>超重要的速查表</b></span></span></h4><table class="notion-simple-table notion-block-2ed00c660d2780c09d04d7c5d08dc932"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-2ed00c660d2780bb9669cccdfd9fc5de"><td class="" style="width:120px"><div class="notion-simple-table-cell">问题问什么</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">属于哪类</div></td></tr><tr class="notion-simple-table-row notion-block-2ed00c660d27806ca834f0b7e73d129a"><td class="" style="width:120px"><div class="notion-simple-table-cell">有多少</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">回归</div></td></tr><tr class="notion-simple-table-row notion-block-2ed00c660d2780769263e0f3e7f4a848"><td class="" style="width:120px"><div class="notion-simple-table-cell">是不是 / 哪个</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">分类</div></td></tr><tr class="notion-simple-table-row notion-block-2ed00c660d27809b8b77cbdfc243dd4a"><td class="" style="width:120px"><div class="notion-simple-table-cell">有哪些（可多个）</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">多标签</div></td></tr><tr class="notion-simple-table-row notion-block-2ed00c660d27802cb792f525ae383437"><td class="" style="width:120px"><div class="notion-simple-table-cell">哪些更重要</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">排序 / 搜索</div></td></tr><tr class="notion-simple-table-row notion-block-2ed00c660d2780d38947eeeb434d369a"><td class="" style="width:120px"><div class="notion-simple-table-cell">给用户推荐</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">推荐系统</div></td></tr><tr class="notion-simple-table-row notion-block-2ed00c660d2780598517cbf885047261"><td class="" style="width:120px"><div class="notion-simple-table-cell">有顺序的数据</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">序列学习</div></td></tr></tbody></table></div></details><details class="notion-toggle notion-block-2ed00c660d2780439dbcccb377542f6e"><summary><span class="notion-teal_background"><b>无监督学习（展开阅读）</b></span></summary><div><blockquote class="notion-quote notion-block-2ed00c660d27806288e6e7f613e3016c"><div>没有标签，让计算机自己发现规律</div></blockquote><div class="notion-text notion-block-2ed00c660d27806c9b62d4227ae0ae42">特点：</div><ul class="notion-list notion-list-disc notion-block-2ed00c660d27808aa022c1cbf824b85d"><li>没有人告诉模型&quot;正确答案&quot;</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780ee9052eb75fa42653b"><li>模型必须自主发现数据中的模式</li></ul><h4 class="notion-h notion-h3 notion-block-2ed00c660d278077a65cf32c97349b51" data-id="2ed00c660d278077a65cf32c97349b51"><span><div id="2ed00c660d278077a65cf32c97349b51" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278077a65cf32c97349b51" title="常见任务："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">常见任务：</span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-2ed00c660d2780a7a1e1e54a423d8d2e" style="list-style-type:decimal"><li><b>聚类（Clustering）</b></li><ol class="notion-list notion-list-numbered notion-block-2ed00c660d2780a7a1e1e54a423d8d2e" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2ed00c660d27808f881dc8d954c6a456"><li>把相似的数据分组</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780e9a978e9f65cb74826"><li>例子：</li><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780e9a978e9f65cb74826"><li>照片分组（风景 / 狗 / 婴儿 / 猫 / 山）</li><li>用户分组（将行为相似的人聚在一起）</li></ul></ul></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2ed00c660d2780f0a2b8cbba8d122a52" style="list-style-type:decimal"><li><b>降维 / 主成分分析（PCA）</b></li><ol class="notion-list notion-list-numbered notion-block-2ed00c660d2780f0a2b8cbba8d122a52" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2ed00c660d278082b09ffeddd955cd14"><li>把数据压缩成少数几个关键参数，同时保留主要信息</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780ca8cadf99cfd982c1b"><li>例子：</li><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780ca8cadf99cfd982c1b"><li>球的运动轨迹 → 用速度、直径、质量描述</li><li>人体形状 → 用少数参数就可以判断整体人的体型，设计衣服</li></ul></ul></ol></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2ed00c660d2780d99265ef888c8d6326" style="list-style-type:decimal"><li><b>因果关系 / 概率图模型</b></li><ol class="notion-list notion-list-numbered notion-block-2ed00c660d2780d99265ef888c8d6326" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780bd95a8ccc60e631d26"><li>找出数据之间的隐藏关系或根本原因</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780f68ce7ee311cf85a65"><li>例子：房价、污染、教育、工资之间的联系</li></ul></ol></ol><ol start="4" class="notion-list notion-list-numbered notion-block-2ed00c660d2780b2a3d6f858bcb5f015" style="list-style-type:decimal"><li><b>生成模型（GANs）</b></li><ol class="notion-list notion-list-numbered notion-block-2ed00c660d2780b2a3d6f858bcb5f015" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780768ddfec8a5b4cf255"><li>学会生成&quot;看起来真实&quot;的数据</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780a2a4d6d703d786eac7"><li>例子：生成逼真的图像、音频</li></ul></ol></ol><div class="notion-text notion-block-2ed00c660d2780da921ddf734c198885">📌 <b>核心思路</b>：无需监督，模型自己学习规律。</div></div></details><details class="notion-toggle notion-block-2ed00c660d27802ca21cecf85e2855f5"><summary><span class="notion-teal_background"><b>强化学习（展开阅读）</b></span></summary><div><blockquote class="notion-quote notion-block-2ed00c660d278081948df5c7ac619f9f"><div>通过在环境中做决策,最大化获得的奖励</div></blockquote><div class="notion-text notion-block-2ed00c660d27804b8311df9ef8ec17bf">特点:</div><ul class="notion-list notion-list-disc notion-block-2ed00c660d27806783a1db30c002ca4d"><li>智能体(agent)在环境中行动</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d278022b772e276a6043756"><li>每一步:</li><ul class="notion-list notion-list-disc notion-block-2ed00c660d278022b772e276a6043756"><ol start="1" class="notion-list notion-list-numbered notion-block-2ed00c660d278039b7e9d6d667bc4399" style="list-style-type:decimal"><li>观察环境</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2ed00c660d27808cb567d760a50d6f68" style="list-style-type:decimal"><li>选择动作</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2ed00c660d2780b592a9c62693ae5ea6" style="list-style-type:decimal"><li>执行动作 → 获得奖励(reward)</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-2ed00c660d2780859190f82b9edb6cab" style="list-style-type:decimal"><li>更新策略 → 进入下一步</li></ol></ul></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d278069aed8d922a101feef"><li>目标:学习一个好的策略(policy)</li><ul class="notion-list notion-list-disc notion-block-2ed00c660d278069aed8d922a101feef"><blockquote class="notion-quote notion-block-2ed00c660d27801389d7d7787da746d9"><div>策略 = 根据环境观察,选择最优动作的方法</div></blockquote></ul></ul><h4 class="notion-h notion-h3 notion-block-2ed00c660d27802088fdcf0ebf3ce927" data-id="2ed00c660d27802088fdcf0ebf3ce927"><span><div id="2ed00c660d27802088fdcf0ebf3ce927" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27802088fdcf0ebf3ce927" title="常见场景:"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">常见场景:</span></span></h4><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780b5b29ac95ace56156c"><li>游戏 AI(AlphaGo、Atari 游戏)</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780388648f89090c7a80f"><li>机器人控制</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780758a9ef287f7d60755"><li>对话系统</li></ul><h4 class="notion-h notion-h3 notion-block-2ed00c660d278092b39dcfc308793c41" data-id="2ed00c660d278092b39dcfc308793c41"><span><div id="2ed00c660d278092b39dcfc308793c41" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278092b39dcfc308793c41" title="核心难点:"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">核心难点:</span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-2ed00c660d278010832de48d59ebe893" style="list-style-type:decimal"><li><b>奖励分配</b></li><ol class="notion-list notion-list-numbered notion-block-2ed00c660d278010832de48d59ebe893" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780be855de56d989ff415"><li>如何选择哪些动作给予奖励，哪些给予惩罚</li></ul></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2ed00c660d2780f4bc26d3298ad5d5a3" style="list-style-type:decimal"><li><b>部分可观测</b></li><ol class="notion-list notion-list-numbered notion-block-2ed00c660d2780f4bc26d3298ad5d5a3" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2ed00c660d278086a4e0ef78771c14e8"><li>当前观察信息不足,需要记住历史信息(例如机器人在迷宫中)</li></ul></ol></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2ed00c660d27803d904dc4dd16000b4b" style="list-style-type:decimal"><li><b>探索 vs 利用</b></li><ol class="notion-list notion-list-numbered notion-block-2ed00c660d27803d904dc4dd16000b4b" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2ed00c660d27803a8235fb976b333666"><li>是使用现有策略获取收益,还是尝试新动作获得更多信息?</li></ul></ol></ol><h4 class="notion-h notion-h3 notion-block-2ed00c660d27805c8d95cd9532d06e0d" data-id="2ed00c660d27805c8d95cd9532d06e0d"><span><div id="2ed00c660d27805c8d95cd9532d06e0d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27805c8d95cd9532d06e0d" title="特殊情况:"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">特殊情况:</span></span></h4><ul class="notion-list notion-list-disc notion-block-2ed00c660d27801a80e4fde9e8f64e0e"><li><b>完全可观察 → 马尔可夫决策过程(MDP)</b></li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780e18112d2d7121be288"><li><b>部分可观察 → 上下文赌博机(Contextual bandit)</b></li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d278099a1ccfc3f31059b16"><li><b>没有状态,只选择动作 → 多臂赌博机(Multi-armed bandit)</b></li></ul><div class="notion-text notion-block-2ed00c660d278066b190de29e58b4e52">📌 <b>核心思路</b>:<span class="notion-red"><span class="notion-yellow_background"><b>没有&quot;正确答案&quot;,只有奖励信号</b></span></span>,通过试错学习最优策略。</div></div></details><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2ed00c660d27807b8b4dd1fe577c3693" data-id="2ed00c660d27807b8b4dd1fe577c3693"><span><div id="2ed00c660d27807b8b4dd1fe577c3693" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27807b8b4dd1fe577c3693" title="六、习题及解答"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">六、习题及解答</span></span></h3><table class="notion-simple-table notion-block-2ed00c660d27800ba319c5999c2f892d"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-2ed00c660d2780b8ad4dc519508ca047"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>原问题</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">说人话</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>核心答案</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>类比/例子</b></div></td></tr><tr class="notion-simple-table-row notion-block-2ed00c660d278023814afbf8f1773178"><td class="" style="width:120px"><div class="notion-simple-table-cell">你当前正在编写的代码的哪些部分可以“学习”，即通过学习和自动确定代码中所做的设计选择来改进？你的代码是否包含启发式设计选择？</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">哪些程序部分可以让计算机<b>自己“学”</b>，而不是手动写？你写的程序里有没有依赖<b>经验法则</b>或技巧？</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">可以学习的部分通常是<b>决策、预测或优化</b>的地方。启发式设计是<b>用经验写的规则</b>，可以被机器学习替代。</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">推荐系统中的手动规则（“看了A<b>推荐</b>B”）可以用模型学习；<b>调参、排序、图像识别</b>也适用。</div></td></tr><tr class="notion-simple-table-row notion-block-2ed00c660d27801482afdc578bc29224"><td class="" style="width:120px"><div class="notion-simple-table-cell">你遇到的哪些问题有许多解决它们的样本，但没有具体的自动化方法？这些可能是使用深度学习的主要候选者。</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">哪些事情有很多示例，但没有<b>现成程序</b>能完全解决？这些适合用深度学习。</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">典型是<b>数据丰富但规则复杂</b>的问题。</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">图片识别、语音识别、自动驾驶、游戏策略。</div></td></tr><tr class="notion-simple-table-row notion-block-2ed00c660d27800baf25e10a62bf2f6a"><td class="" style="width:120px"><div class="notion-simple-table-cell">如果把人工智能的发展看作一场新的工业革命，那么算法和数据之间的关系是什么？它类似于蒸汽机和煤吗？根本区别是什么？</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">算法和数据在AI中像什么？是不是像蒸汽机和煤？有什么不同？</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">算法像工具，数据像燃料。不同点是AI算法必须依赖<b>大量数据</b>才能“工作”，数据和算法相互依赖。</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">蒸汽机独立工作，煤只提供能量；AI算法没有智能，需要数据训练才能发挥作用。</div></td></tr><tr class="notion-simple-table-row notion-block-2ed00c660d27807d89cbc4b0a7a2d51f"><td class="" style="width:120px"><div class="notion-simple-table-cell">你还可以在哪里应用端到端的训练方法，比如物理、工程和计量经济学？</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">在哪些领域可以让系统直接学“<b>从输入到输出</b>”？</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">适合<b>复杂系统、难以手动建模</b>的流程。</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>物理</b>：预测流体或天气；<b>工程</b>：机器人行走/抓取；<b>经济学</b>：预测股价或消费行为。</div></td></tr></tbody></table></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[英语兔B站网课学习笔记]]></title>
            <link>intro/article/en1</link>
            <guid>intro/article/en1</guid>
            <pubDate>Thu, 29 Jan 2026 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-2f700c660d27801e9d40e0b0813c9493"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2f700c660d2780589cc5fff6e60ad22b" data-id="2f700c660d2780589cc5fff6e60ad22b"><span><div id="2f700c660d2780589cc5fff6e60ad22b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f700c660d2780589cc5fff6e60ad22b" title="一、道"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>一、道</b></span></span></h2><div class="notion-callout notion-gray_background_co notion-block-2f700c660d2780e9a3ddc7e33ab37e2c"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text">1.<b>规范的知识英语</b>和<b>日常的本能英语</b>都需要学<div class="notion-text notion-block-2f700c660d2780979969de301f0e3906">知识英语：校准本能，防止自我满足</div><div class="notion-text notion-block-2f700c660d2780cb83d8fce6bd7c642b">本能英语：提升效率，防止自我限制</div></div></div><div class="notion-callout notion-gray_background_co notion-block-2f700c660d278015ac6cd909fbb16c7f"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2f700c660d2780e785f7ce05cbe0253b">2.汉语和英语是<b>两个系统</b>，不能混淆学习</div></div></div><div class="notion-callout notion-gray_background_co notion-block-2f700c660d2780f5b4f7d512485d1282"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2f700c660d2780c882c1f6a28c110466">3.选择<b>合适的难度输入</b>，不能太难，也不能太简单（可理解输入）</div><div class="notion-text notion-block-2f700c660d278024a3dae6831b3dddff"><b>克服</b>失败的恐惧，按兴趣学习（避免低情感学习）</div><div class="notion-text notion-block-2f700c660d27808890b6efa0b8cad25e">保证<b>足够的</b>练习（足量输入）</div></div></div><div class="notion-callout notion-gray_background_co notion-block-2f700c660d2780b8a105fbc92a9eadf8"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2f700c660d278093b99fd2608d1bbffc">4.<b>刻意</b>输出，善于运用新学到的知识</div></div></div><div class="notion-callout notion-gray_background_co notion-block-2f700c660d278024940af1e6568d64ba"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2f700c660d2780f3a6f8fcaf1b0e0ccb">5.步骤3（输入） → 步骤4（输出） → 步骤1（纠错）</div><div class="notion-text notion-block-2f700c660d27800ab6aff1f8af5badd5">认识到这是一个<b>循环螺旋上升</b>的过程</div></div></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2f700c660d2780c3aa0de96de06257e9" data-id="2f700c660d2780c3aa0de96de06257e9"><span><div id="2f700c660d2780c3aa0de96de06257e9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f700c660d2780c3aa0de96de06257e9" title="二、音"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">二、音</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2f700c660d27808586eafc98014f5d16" data-id="2f700c660d27808586eafc98014f5d16"><span><div id="2f700c660d27808586eafc98014f5d16" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f700c660d27808586eafc98014f5d16" title="回音法："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">回音法：</span></span></h3><div class="notion-to-do notion-block-2f700c660d27809bbbd2d45a2233e861"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">材料：遵循 <span class="notion-teal_background"><b>合适输入、感兴趣</b></span></div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2f700c660d2780a6908dd44322837108"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">听：学会 在<span class="notion-teal_background"><b>一个知识点</b></span>停下</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2f700c660d2780e0beb5c45d20d83d15"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">回忆：不要马上模仿，先<span class="notion-teal_background"><b>回忆</b></span>一遍要点</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2f700c660d278016b302f5a99f489646"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">对比：一定要录下来<span class="notion-teal_background"><b>自己的音</b></span>进行对比</div></div><div class="notion-to-do-children"></div></div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2f700c660d2780238669d7f73a5fabec" data-id="2f700c660d2780238669d7f73a5fabec"><span><div id="2f700c660d2780238669d7f73a5fabec" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f700c660d2780238669d7f73a5fabec" title="影子跟读法："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">影子跟读法：</span></span></h3><div class="notion-to-do notion-block-2f700c660d2780358e99eafed31a2cc6"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">材料：1-3分钟，语气适中，发音清晰，最好带文本稿子。<span class="notion-teal_background"><b>合适输入，感兴趣</b></span></div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2f700c660d2780b7b958ecb25c255bf8"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">律动：不要完全重合，滞后 半秒到1秒，<span class="notion-teal_background"><b>先不看稿，只模仿</b></span>，从模仿律动开始</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2f700c660d2780538e1aeaaf37137993"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">文本：模仿完律动，再跟着学会的律动，<span class="notion-teal_background"><b>打开稿子，跟读文本</b></span></div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2f700c660d2780808004f8340b308955"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">对比：关掉原声，录下<span class="notion-teal_background"><b>自己的</b></span>跟读音频，听是否合格</div></div><div class="notion-to-do-children"></div></div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2f700c660d27806eaff0da720a8092f9" data-id="2f700c660d27806eaff0da720a8092f9"><span><div id="2f700c660d27806eaff0da720a8092f9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f700c660d27806eaff0da720a8092f9" title="实操："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">实操：</span></span></h3><div class="notion-text notion-block-2f700c660d2780e4992fc83997dfcf66">日常对一段材料，先进行 <span class="notion-teal_background"><b>影子跟读</b></span> ，遇到卡壳的地方，再对错的地方单独进行 <span class="notion-teal_background"><b>回音法</b></span></div><div class="notion-text notion-block-2f700c660d2780c98445d814c1897a1e">然后再<span class="notion-teal_background"><b>重新进行 影子跟读，关键在于对比！</b></span></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2f700c660d2780798829d4f51073314a" data-id="2f700c660d2780798829d4f51073314a"><span><div id="2f700c660d2780798829d4f51073314a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f700c660d2780798829d4f51073314a" title="三、法"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">三、法</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2f700c660d27800a8e87e960defdb866" data-id="2f700c660d27800a8e87e960defdb866"><span><div id="2f700c660d27800a8e87e960defdb866" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f700c660d27800a8e87e960defdb866" title="词："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">词：</span></span></h3><div class="notion-text notion-block-2f700c660d2780329c1cf54c65a84917">1.动词不裸奔，遇到时态要变形</div><div class="notion-text notion-block-2f700c660d27809cbb78fce52f09ab61">2.主动与被动需要区分</div><div class="notion-text notion-block-2f700c660d2780cca0f6fb86e15bc475">3.注意I She He me her him ，主谓</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2f700c660d278011963ac1929f5bdf49" data-id="2f700c660d278011963ac1929f5bdf49"><span><div id="2f700c660d278011963ac1929f5bdf49" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f700c660d278011963ac1929f5bdf49" title="句："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">句：</span></span></h3><div class="notion-text notion-block-2f700c660d2780918d53e2d16e828f62">1.强调句子必须有主干，即使主干不明显，也需要用 there 或者 it 做形式主语</div><div class="notion-text notion-block-2f700c660d2780bc8dfddbd5c16f1065">2.逻辑独立的两个句子之间，必须有链接词：but、and……</div><div class="notion-text notion-block-2f700c660d2780638ba5d327c242d50c">3.右分支修饰，修饰词在修饰主体右边</div><div class="notion-text notion-block-2f700c660d2780debac5f57928fe6ab2">4.名词封装，比如 跑的快 用 速度 来代指</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2f700c660d27805380b2faafd1e93351" data-id="2f700c660d27805380b2faafd1e93351"><span><div id="2f700c660d27805380b2faafd1e93351" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f700c660d27805380b2faafd1e93351" title="长难句："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">长难句：</span></span></h3><div class="notion-to-do notion-block-2f700c660d27806b997be2fe2c3a63ff"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">1.介词短语： <span class="notion-teal_background"><b>in on at of</b></span> 等，用（）括起来</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2f700c660d278016923ff065fdfd5662"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">2.同位语：Mr.T, <span class="notion-teal_background"><b>My best friend</b></span>, loves orange.</div></div><div class="notion-to-do-children"><div class="notion-text notion-block-2f700c660d2780eebb24c5198a10891c">用 &lt;&gt; 标注</div></div></div><div class="notion-to-do notion-block-2f700c660d27809182eccdada3a57341"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">3.非谓语动词：The wolf <span class="notion-teal_background"><b>driven by hanger</b></span> ran fast.</div></div><div class="notion-to-do-children"><div class="notion-text notion-block-2f700c660d2780af8b41dea768a0c67b">用 [] 标注，通常 done/doing 形式单独出现</div></div></div><div class="notion-to-do notion-block-2f700c660d278054ab97c09d015003d3"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">4.从句：<span class="notion-teal_background"><b>which、that</b></span> 等</div></div><div class="notion-to-do-children"><div class="notion-text notion-block-2f700c660d2780f59a56e7c075022d7a">用 {} 标注</div></div></div><div class="notion-callout notion-gray_background_co notion-block-2f700c660d2780f8a8d6d8598524ed69"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2f700c660d278059ba54da49e0f83237">你是⼀位专业的英语⻓难句分析师。你的任务是使⽤“修剪法”帮助⽤⼾分析复
杂的英语句⼦，去除修饰成分，找出核⼼主⼲。
请严格遵守以下四种符号标记规则对⽤⼾提供的句⼦进⾏重写（修剪）：
1.介词短语：识别由in,on,at,with,by,for,of,about等介词开头的短语，⽤圆
括号(...)包裹。
2.同位语：识别夹在逗号或破折号中间、⽤于解释名词⾝份的名词短语，⽤尖括
号&lt;...&gt;包裹。
3.⾮谓语动词短语：识别由doing,done,todo开头的修饰性短语（⾮谓语动
词），⽤⽅括号[...]包裹。注意：区分谓语动词和⾮谓语动词。
4.从句：识别由that,which,who,where,when,if,although等引导的从句，⽤
花括号{...}包裹。
流程：
1.修剪展⽰：输出标记好符号的完整句⼦。
2.核⼼主⼲：去除所有被符号包裹的成分，只保留剩下的主语、谓语（和宾语/表
语），并提供核⼼主⼲的中⽂翻译。
3.难点解析：如果句⼦中有极易混淆的成分（如倒装、省略或复杂的嵌套），⽤⼀
句话简要点拨。
⽰例：
⽤⼾输⼊：Thewolf,drivenbyhunger,didnotnoticethetrapthatthehunter
set.
你的回答：
【修剪后】：Thewolf[driven(byhunger)]didnotnoticethetrap{thatthe
hunterset}.
【核⼼主⼲】：Thewolfdidnotnoticethetrap.(狼没发现陷阱)
我的句⼦是：</div></div></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2f700c660d278068996cc8b5771cc2fe" data-id="2f700c660d278068996cc8b5771cc2fe"><span><div id="2f700c660d278068996cc8b5771cc2fe" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f700c660d278068996cc8b5771cc2fe" title="四、词"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">四、词</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2f700c660d27801499c3f0d9249d9bc7" data-id="2f700c660d27801499c3f0d9249d9bc7"><span><div id="2f700c660d27801499c3f0d9249d9bc7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f700c660d27801499c3f0d9249d9bc7" title="1.关注："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1.关注：</span></span></h3><div class="notion-text notion-block-2f700c660d2780f4a156d825a9f684da">一次多义、短语搭配（give up）、俗语、动词搭配（make a mistake）</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2f700c660d27804d8a42dd52936dcb31" data-id="2f700c660d27804d8a42dd52936dcb31"><span><div id="2f700c660d27804d8a42dd52936dcb31" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f700c660d27804d8a42dd52936dcb31" title="2.输入："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2.输入：</span></span></h3><div class="notion-text notion-block-2f700c660d2780bba633c6b78d68ecee">不要一遇到生词就去查，如果需要频繁查询，就换一个 <span class="notion-teal_background"><b>有效输入</b></span></div><div class="notion-callout notion-gray_background_co notion-block-2f700c660d2780e799dbf91d1a509f0b"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2f700c660d27804ab138f3254039e079">你是⼀位专业的英语语⾔学专家，精通CEFR（欧洲语⾔共同参考框架）分级标准
和⽂本难度分析。
请分析我提供的英语⽂本，并⽣成⼀份【⽂本难度体检报告】。
严格按照以下三个维度进⾏评估，不要直接翻译⽂章：
1.难度定级-CEFR等级：给出⼀个整体难度评级（如：A2、B1、C1等）。-对标参考：⽤中国学⽣熟悉的考试体系做类⽐（例如：适合中考/⾼考/四级/六
级/考研/专⼋⽔平）。
2.词汇成分-请估算：有多少⽐例的词汇是基础词（A1~B2），有多少⽐例是挑战词（C1~
C2）？（例如：80%基础词+20%挑战词）。-拦路⻁预警：列出⽂中难度最⾼、最可能阻碍理解的3-5个关键词，并附带中⽂
简义。
3.阅读建议</div><div class="notion-text notion-block-2f700c660d2780c59140d7e73f8abf84">如果读者的⽬标是“舒适阅读”（i+1），这篇⽂章适合什么阶段的学习者？
⽰例：
【⽂本难度体检报告】
难度：CEFRB2（中⾼级）|适合⼤学四六级⽔平
成分：约85%为常⽤词，但含有少量⽂学性描述。
拦路⻁：
1.Reluctant(不情愿的)
2.Ambiguous(模棱两可的)
建议：如果你有3500以上词汇量，这篇⽂章是极好的进阶材料；如果是初学者，
可能会感到吃⼒。
需要分析的⽂本是：</div></div></div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2f700c660d278011afcbdd8ad9835449" data-id="2f700c660d278011afcbdd8ad9835449"><span><div id="2f700c660d278011afcbdd8ad9835449" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f700c660d278011afcbdd8ad9835449" title="3.记忆："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3.记忆：</span></span></h3><div class="notion-to-do notion-block-2f700c660d2780979bf0db12e7410aa6"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">找熟悉元素，如 abnormal 里面的 normal</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2f700c660d2780e58087f566d8786d4d"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">关注重音，听完后跟读，用回音法，先思考再跟读</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2f700c660d27800c8dc2df9418dcbb93"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">关注画面，词对应的画面</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2f700c660d2780bb8379dc3457147ffa"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">抄写其实很有用，最好抄写加例句，自己造句</div></div><div class="notion-to-do-children"></div></div><div class="notion-callout notion-gray_background_co notion-block-2f700c660d27808cb535c92071e6c09b"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2f700c660d2780e48239ef217dc5dda3">你是我的“英语单词深度刻印教练”。我将发给你⼀个英语单词，请你严格按照
以下五个维度，协助我记忆：
1.【看】：分析单词的拼写结构，并提供⼀个关于单词⻓相的视觉记忆点。
2.【听】：标出⾳标，加粗重读⾳节，并简单描述发⾳的听感（如：爆破感、丝滑
感、沉闷感）。
3.【说】：简单描述发这个⾳时⼝腔肌⾁的重点动作（如：咬⾆、撅嘴、弹⾆）。
4.【演】：设计⼀个我可以在原地做的、具体的肢体动作来演义这个词。
5.【写】：提供⼀个极简的包含这个词的英语短句，让我抄写。句中不要出现其他
难词。</div><div class="notion-text notion-block-2f700c660d2780368f98da92e4f2c6e3">请⽤⽣动、直观的语⾔输出。
我的单词是：</div></div></div><div class="notion-to-do notion-block-2f700c660d2780498675ff1e4abcc24d"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">关注词根词缀，从已知、高频入手。例如 transport import export passport</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2f700c660d2780a08245c09513932f8e"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">遇到生词，先结合上下文猜测，再去查词典，注意需要看这个词的英文释义</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2f700c660d2780a4a6fbdb76a6e61c1b"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">按短语或简单例句去记忆单词</div></div><div class="notion-to-do-children"></div></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2f700c660d27803d90c3f4e3c87626a3" data-id="2f700c660d27803d90c3f4e3c87626a3"><span><div id="2f700c660d27803d90c3f4e3c87626a3" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f700c660d27803d90c3f4e3c87626a3" title="五、听"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">五、听</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2f700c660d278085ad3fdf453c163f19" data-id="2f700c660d278085ad3fdf453c163f19"><span><div id="2f700c660d278085ad3fdf453c163f19" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f700c660d278085ad3fdf453c163f19" title="1.精听"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1.精听</span></span></h3><div class="notion-text notion-block-2f700c660d27807c9b86c7a310c2e89a">一定要自己把听到的快速写下来，重复5遍，然后单独关注没有听出来的部分，原因是什么</div><div class="notion-text notion-block-2f700c660d278043b686e8c1c9a8aa7f">常见原因：<div class="notion-text-children"><div class="notion-text notion-block-2f700c660d2780f9a34bdd9edfed618d">语音：连读、弱读、爆破 → 需要巩固发音知识</div><div class="notion-text notion-block-2f700c660d27807ba851fde42968bc7e">词汇：积累词汇</div><div class="notion-text notion-block-2f700c660d278028b861fbd1036349a8">语法：短语、动词搭配不认识 → 积累</div></div></div><div class="notion-text notion-block-2f700c660d2780228a76ee4921a851e1">解决问题后，重新听一遍，再跟读一边，注意模仿语音</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2f700c660d27801d8fe7f48f0d5ca684" data-id="2f700c660d27801d8fe7f48f0d5ca684"><span><div id="2f700c660d27801d8fe7f48f0d5ca684" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f700c660d27801d8fe7f48f0d5ca684" title="2.泛听"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2.泛听</span></span></h3><div class="notion-to-do notion-block-2f700c660d27808aa147fc0136446cde"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">需要保证跟得上情节，不能想着翻译成中文，理解英文，实时理解，非必要不暂停不回撤</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2f700c660d2780dfa69cc6cfb4a22451"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">只有一个词反复出现并影响理解情节时，才暂停回撤记录下来</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2f700c660d2780d7bc05fc69cc16c17d"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">听完之后，带字幕再看，只看卡住的地方，其它不看，不用理解全文</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2f700c660d2780fa9173fe2e24800606"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">再重新听一遍</div></div><div class="notion-to-do-children"></div></div><div class="notion-text notion-block-2f700c660d278010b59be1d748c9b163">注意，泛听注意限制话题，一段时间内只听一个题材的材料</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2f700c660d2780d68ecec8326015a6b6" data-id="2f700c660d2780d68ecec8326015a6b6"><span><div id="2f700c660d2780d68ecec8326015a6b6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f700c660d2780d68ecec8326015a6b6" title="五、口"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">五、口</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2f700c660d27806e967af2e83a41b9a5" data-id="2f700c660d27806e967af2e83a41b9a5"><span><div id="2f700c660d27806e967af2e83a41b9a5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f700c660d27806e967af2e83a41b9a5" title="1.复述："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1.复述：</span></span></h3><div class="notion-to-do notion-block-2f700c660d2780849637f740adf2ee7c"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">选合适输入，难度适中，篇幅短小</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2f700c660d2780e7a8f1dd894a7fe749"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">主角是谁，发生了啥，原因是啥。确认之后，关掉输入，自己总结</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2f700c660d27802a9e17d3b566276679"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">对比哪些词或短语自己用的<span class="notion-teal_background"><b>更低级或更不地道</b></span>，记录下来</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-2f700c660d2780e58c4ddbf0cee163a3"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">重复</div></div><div class="notion-to-do-children"></div></div><div class="notion-text notion-block-2f700c660d2780e8aedad9d618229eb8">可以让AI帮忙纠正！</div><div class="notion-callout notion-gray_background_co notion-block-2f700c660d2780b2af11d150526b5652"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2f700c660d2780949a49c306aee2ac17">⻆⾊设定：你是我的英语⼝语复述教练。
任务⽬标：帮助我通过“复述法”练习⼝语，找出我和原⽂的差距，并引导我发
表观点。
交互步骤：
1.我会先发给你⼀段【英语原⽂】。
2.然后，我会语⾳输⼊【我的复述版】（这是我凭记忆和理解重新组织的内容）。
3.收到我的复述后，请你务必完成以下三个反馈动作：-语法纠错：指出我复述内容⾥明显的语法错误或中式表达。-差距分析（重点）：对⽐原⽂，告诉我哪些原⽂⾥的“⾼级词汇”或“地道搭
配”我没⽤上（例如：原⽂⽤了plummeted，但我只⽤了wentdown，请明确
指出来并建议我替换）。-观点追问：基于⽂章内容，向我提⼀个开放性问题（例如“你怎么看这件
事？”或“如果是你，你会怎么做？”），逼我从“转述事实”升级为“表达观
点”。
如果你明⽩了，请回复：“教练已就位！请发送你的原⽂。</div></div></div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2f700c660d2780cf92abf384136075fe" data-id="2f700c660d2780cf92abf384136075fe"><span><div id="2f700c660d2780cf92abf384136075fe" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f700c660d2780cf92abf384136075fe" title="2.表达"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2.表达</span></span></h3><div class="notion-text notion-block-2f700c660d27805a959ae4ea012654fc">观点：i think……</div><div class="notion-text notion-block-2f700c660d2780c08fcbdace097d6abb">假设：if i were……</div><div class="notion-text notion-block-2f700c660d27802a9603e7282fd86e40">联系：actually, the xxx relates to my life</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2f700c660d2780c9b289c7141f1e989f" data-id="2f700c660d2780c9b289c7141f1e989f"><span><div id="2f700c660d2780c9b289c7141f1e989f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f700c660d2780c9b289c7141f1e989f" title="六、读"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">六、读</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2f700c660d278070a29ad9b5c2bfb671" data-id="2f700c660d278070a29ad9b5c2bfb671"><span><div id="2f700c660d278070a29ad9b5c2bfb671" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f700c660d278070a29ad9b5c2bfb671" title="1.精读"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1.精读</span></span></h3><div class="notion-text notion-block-2f700c660d27809ca1fad87b61823ce2"><b>总览：</b></div><div class="notion-text notion-block-2f700c660d2780a5955cc3896a128736">找出生词和不理解的句子</div><div class="notion-text notion-block-2f700c660d27803e9025ddb68a36736d">对于单词，不仅要只学单词，还要知道它的常见搭配</div><div class="notion-text notion-block-2f700c660d2780d7b3fdf0bfd0e2071d"><b>提炼：</b></div><div class="notion-text notion-block-2f700c660d278007a437fddafe7ae675">按照之前的分析方法，提炼段落的主体（修饰等词句标注好）</div><div class="notion-text notion-block-2f700c660d27807e8d5cf8c4e073424f"><b>回译：</b></div><div class="notion-text notion-block-2f700c660d2780f49971db5ab968e6f4">看着译文或者自己翻译的译文，重新写一遍英文</div><div class="notion-text notion-block-2f700c660d278040bdb4fc750d0e6bac"><b>同步：</b></div><div class="notion-text notion-block-2f700c660d2780c89d70f42fcdf28d4d">如果有音频，不暂停无缝跟读，不用像影子跟读一样间隔半秒或者1秒</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2f700c660d2780168cd8dec0d8c067f0" data-id="2f700c660d2780168cd8dec0d8c067f0"><span><div id="2f700c660d2780168cd8dec0d8c067f0" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f700c660d2780168cd8dec0d8c067f0" title="2.泛读"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2.泛读</span></span></h3><div class="notion-text notion-block-2f700c660d278049894af9fd8897886a">每一页一般只查一个词，且这个词需要满足这两个条件之一：猜不出来、反复出现</div><div class="notion-callout notion-gray_background_co notion-block-2f700c660d278025ab01ca6886a6fac8"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2f700c660d27803183d7ca5f82fc034d">你是⼀位资深的英语教学专家与⽂本难度分析师。请为我提供的英语⽂本进⾏多
维度的“泛读难度分级评估”，帮助我快速判断该⽂本是否适合我当前的英语⽔
平进⾏泛读。
1.CEFR 和蓝思值：请给出以下⽂本的CEFR等级（如A2,B1,C2）和预估的蓝思
值范围。
2.词汇⻔槛：要舒适地（即不查字典也能理解98%以上内容）泛读这篇⽂章，⼤
约需要多少词汇量？（例如：中学/四级/六级/专⼋）。
3.信噪⽐预警：请列出⽂中可能阻碍理解的3-5个“超纲关键词”或“⻓难
句”，并简要说明其难度。</div><div class="notion-text notion-block-2f700c660d27809c850bdddde5fa2506">4.最终建议：如果我是⼀个有[⼤学六级]基础的学习者，这篇⽂章适合作为“泛
读材料”吗？（请回答：适合/太难/太简单，并说明理由）。</div></div></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2f700c660d2780dba51fea18d91f5b05" data-id="2f700c660d2780dba51fea18d91f5b05"><span><div id="2f700c660d2780dba51fea18d91f5b05" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f700c660d2780dba51fea18d91f5b05" title="七、写"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">七、写</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2f700c660d278079bfd6fba32de4acc4" data-id="2f700c660d278079bfd6fba32de4acc4"><span><div id="2f700c660d278079bfd6fba32de4acc4" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f700c660d278079bfd6fba32de4acc4" title="1.左向修饰（who how why）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1.左向修饰（who how why）</span></span></h3><div class="notion-text notion-block-2f700c660d278057a2f3cb9d0534b61b">the girl is reading a book</div><div class="notion-text notion-block-2f700c660d2780159207d6585beb8f45">the <span class="notion-teal_background"><b>attentive</b></span> girl is <span class="notion-teal_background"><b>silently</b></span> reading a <span class="notion-teal_background"><b>thick</b></span> book</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2f700c660d2780c8b1b5cc9b495e1154" data-id="2f700c660d2780c8b1b5cc9b495e1154"><span><div id="2f700c660d2780c8b1b5cc9b495e1154" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f700c660d2780c8b1b5cc9b495e1154" title="2.添加时空（what exactly）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2.添加时空（what exactly）</span></span></h3><div class="notion-text notion-block-2f700c660d278018a42ae18326952a44"><span class="notion-teal_background"><b>yesterday afternoon</b></span>, the <span class="notion-teal_background"><b>attentive</b></span> girl <span class="notion-teal_background"><b>silently</b></span> read a <span class="notion-teal_background"><b>thick</b></span> book <span class="notion-teal_background"><b>in the cornor of the library</b></span> </div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2f700c660d278063befec543f782532c" data-id="2f700c660d278063befec543f782532c"><span><div id="2f700c660d278063befec543f782532c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f700c660d278063befec543f782532c" title="3.右向修饰"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3.右向修饰</span></span></h3><div class="notion-text notion-block-2f700c660d2780e9900ad037683e66fc"><span class="notion-teal_background"><b>yesterday afternoon</b></span>, the <span class="notion-teal_background"><b>attentive</b></span> girl, <span class="notion-teal_background"><b>who was sitting by the window</b></span> <span class="notion-teal_background"><b>silently</b></span> read a <span class="notion-teal_background"><b>thick</b></span> book <span class="notion-teal_background"><b>recommended by her teacher</b></span> <span class="notion-teal_background"><b>in the cornor of the library</b></span> </div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2f700c660d27804283a0da80010e774c" data-id="2f700c660d27804283a0da80010e774c"><span><div id="2f700c660d27804283a0da80010e774c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f700c660d27804283a0da80010e774c" title="实战："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">实战：</span></span></h3><blockquote class="notion-quote notion-block-2f700c660d27806091a4d5aef95ec6d6"><div>the government should invest in public transport</div></blockquote><blockquote class="notion-quote notion-block-2f700c660d2780879005c5554f6da9ad"><div>the <b>municipal</b> gorvernment should <b>strategically</b> invest in public transport <b>to alleviate traffic congestion</b></div></blockquote><blockquote class="notion-quote notion-block-2f700c660d2780d7af5adf2f94b6237a"><div>the <b>municipal</b> gorvernment should <b>strategically</b> invest in <span class="notion-teal_background"><b>modernizing and expanding subway networks</b></span> <b>to alleviate traffic congestion</b></div></blockquote><blockquote class="notion-quote notion-block-2f700c660d27803c965bdb6de7f33ae8"><div>by <b>strategically</b> investing in <span class="notion-teal_background"><b>modernizing and expanding subway networks, </b></span>the <b>municipal</b> gorvernment can effectively <b>alleviate traffic congestion</b></div></blockquote><blockquote class="notion-quote notion-block-2f700c660d2780dda2f2f0c0f8cd71d0"><div>by <b>strategically</b> investing in <span class="notion-teal_background"><b>modernizing and expanding subway networks, </b></span>the <b>municipal</b> gorvernment can effectively <b>alleviate traffic congestion, thereby(从而) promoting a greener urban lifestyle</b></div></blockquote><div class="notion-callout notion-gray_background_co notion-block-2f700c660d27807a8540dd35d66029bd"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2f700c660d278057864cc973b6aca5eb">你是⼀位专业的英语写作教练。请利⽤“记者提问法”（5W1H），引导我把⼀个
简单的英语句⼦扩充为结构丰富的⾼级⻓句。
请不要⼀次性给出最终答案！请严格按照以下三个阶段，⼀步步引导我进⾏扩
写：
【阶段⼀：增加细节】
请扮演记者，针对句⼦中的名词或动词，问我Who/What/How等问题。-&gt;引导我使⽤“形容词”或“副词”，添加到词的“前⾯”进⾏修饰。
【阶段⼆：增加时空背景】
请扮演记者，问我When/Where等问题。-&gt;引导我使⽤“介词短语”来补充时间或地点信息。
【阶段三：增加结构深度（重点）】
请扮演记者，进⾏更深度的追问（如具体的⾝份、原因、结果或⼿段）。-&gt;引导我使⽤“定语从句（who/which...）”、“⾮谓语动词
（doing/done...）”或“逻辑状语”。-&gt;必须强调：这些复杂的修饰成分要放在被修饰词的“后⾯”（即右分⽀结构）。
【交互规则】
1.每次只进⾏⼀个阶段。
2.在我提交修改后的句⼦后，请先点评我的语法是否正确，然后再进⼊下⼀个阶
段。
3.三个阶段完成后，请⽣成⼀个由你润⾊的“满分版本”供我参考。
我的第⼀个种⼦句是：[Thedogbarked.]</div></div></div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2f700c660d2780b9ab01d5df3c1a34c5" data-id="2f700c660d2780b9ab01d5df3c1a34c5"><span><div id="2f700c660d2780b9ab01d5df3c1a34c5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f700c660d2780b9ab01d5df3c1a34c5" title="仿写文章"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">仿写文章</span></span></h3><div class="notion-to-do notion-block-2f700c660d27807fbdb5d2c544ef37ea"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">文章拆解成笔记，不要抄原文</div></div><div class="notion-to-do-children"><div class="notion-text notion-block-2f700c660d2780469801fb67c0559f00">如 online learning = convenient</div><div class="notion-text notion-block-2f700c660d278087b16dfe49acf16c22">teacher’s worry: 1.xxx 2.xxx 3.xxx</div></div></div><div class="notion-to-do notion-block-2f700c660d27801c8570e1bb68e8f5e5"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">试着不看原文，去复现原文</div></div><div class="notion-to-do-children"><div class="notion-text notion-block-2f700c660d2780a3a48bed224f33d8c1">找出不同点，重点记忆</div></div></div><div class="notion-callout notion-gray_background_co notion-block-2f700c660d2780eba3a9c0c2a1e1cc08"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2f700c660d2780f08084fa7466e1da54">你是我的英语写作私教。我刚刚完成了⼀次富兰克林写作法的盲写练习，现在需
要你帮我进⾏深度的⽐对复盘。
【⼤师原⽂】：
[粘贴原⽂]
【我的复写】：
[粘贴你的复写版]
请忽略表⾯的拼写或简单语法错误，重点从思维层⾯，对⽐以下三个维度的差
距：
1.⽤词：
请对⽐我对词汇的选择和原⽂的区别。原⽂的⽤词是否⽐我的更地道、更符合语
境或更具⾊彩？我是否使⽤了⽣硬的中式翻译词汇？
2.句式：
请对⽐句⼦的构造⽅式。原⽂是⻓短句结合更有节奏感，还是使⽤了更⾼效的句
型来承载信息？⽽我是否只是在机械地堆砌简单句？请指出原⽂在句式上的⾼明
之处。
3.逻辑：
请检查句⼦与句⼦之间的粘连度。原⽂是如何通过连接词、指代词或内在逻辑，
让⽂章读起来⾏云流⽔的？⽽我的句⼦之间是否感觉松散或跳跃？
请不要只给我改错，请直接⽤犀利的语⾔告诉我：原⽂的这种写法，⽐我的好在
哪⾥？</div></div></div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[深度学习3-deepzard网课1]]></title>
            <link>intro/article/dl3</link>
            <guid>intro/article/dl3</guid>
            <pubDate>Mon, 26 Jan 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[介绍与tensor]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-2f400c660d27801cbd47f7587f3cd01a"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2f400c660d2780229042cd4b538bc04b" data-id="2f400c660d2780229042cd4b538bc04b"><span><div id="2f400c660d2780229042cd4b538bc04b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f400c660d2780229042cd4b538bc04b" title="一、Intro and GPU"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">一、Intro and GPU</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2f400c660d2780f9ab1bf0985c9480dc" data-id="2f400c660d2780f9ab1bf0985c9480dc"><span><div id="2f400c660d2780f9ab1bf0985c9480dc" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f400c660d2780f9ab1bf0985c9480dc" title="安装 torch-GPU"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">安装 torch-GPU</span></span></h3><div class="notion-text notion-block-2f400c660d2780c2a826cf3fd5b41172">教程（点击观看）： <span class="notion-purple"><span class="notion-teal_background"><b><a class="notion-link" href="https://www.bilibili.com/video/BV1FFzpBFEH9/" target="_blank" rel="noopener noreferrer">零基础pytorch gpu安装教程</a></b></span></span></div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2f400c660d27803eb57cc89f5d9ef8f7" data-id="2f400c660d27803eb57cc89f5d9ef8f7"><span><div id="2f400c660d27803eb57cc89f5d9ef8f7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f400c660d27803eb57cc89f5d9ef8f7" title="tensor移动到cuda"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">tensor移动到cuda</span></span></h3><div class="notion-callout notion-gray_background_co notion-block-2f400c660d2780a894e7d69c0440cb71"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2f400c660d2780dfb5d8ccb9a5708a9f"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Ad6aba380-c480-4cd9-b3a3-ca5148b954bb%3Aimage.png?table=block&amp;id=2f400c66-0d27-80df-b5d8-ccb9a5708a9f&amp;t=2f400c66-0d27-80df-b5d8-ccb9a5708a9f" alt="notion image" loading="lazy" decoding="async"/></div></figure></div></div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2f400c660d2780b1985efac47c4bc9da" data-id="2f400c660d2780b1985efac47c4bc9da"><span><div id="2f400c660d2780b1985efac47c4bc9da" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f400c660d2780b1985efac47c4bc9da" title="深度学习层次理解（堆栈）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">深度学习层次理解（堆栈）</span></span></h3><div class="notion-callout notion-gray_background_co notion-block-2f400c660d278071abf0e34e2acd09f4"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2f400c660d27803587bfcf4bd3b3bd66">（从底层到顶层）GPU → CUDA/cuDNN → PyTorch/Python</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2f400c660d2780f8b4f2f7fb946be7d6"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A12173989-00aa-41be-8439-113d4e0878b6%3Aimage.png?table=block&amp;id=2f400c66-0d27-80f8-b4f2-f7fb946be7d6&amp;t=2f400c66-0d27-80f8-b4f2-f7fb946be7d6" alt="notion image" loading="lazy" decoding="async"/></div></figure></div></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2f400c660d2780189c7dd3c18a1bb931" data-id="2f400c660d2780189c7dd3c18a1bb931"><span><div id="2f400c660d2780189c7dd3c18a1bb931" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f400c660d2780189c7dd3c18a1bb931" title="二、Tensor"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">二、Tensor</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2f400c660d2780ccab91f9d339ca256c" data-id="2f400c660d2780ccab91f9d339ca256c"><span><div id="2f400c660d2780ccab91f9d339ca256c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f400c660d2780ccab91f9d339ca256c" title="称呼"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">称呼</span></span></h3><div class="notion-text notion-block-2f400c660d2780169598da705d734900"><span class="notion-purple"><span class="notion-teal_background"><b>n维tensor</b></span></span><span class="notion-purple"><span class="notion-teal_background"> / </span></span><span class="notion-purple"><span class="notion-teal_background"><b>n维数组</b></span></span>实际上是计算机里对数据的科学称呼</div><div class="notion-text notion-block-2f400c660d278019a3f0febae6c6ffb9">n表示通过几个索引来找到单个元素，“维”这个字也被叫做轴（axis）</div><div class="notion-callout notion-gray_background_co notion-block-2f400c660d27800f8b9af21fe23414ba"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2f400c660d27808799bdda5b53d6ed6e"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Ab86dc271-598e-4e16-9658-87cdf8be2f5c%3Aimage.png?table=block&amp;id=2f400c66-0d27-8087-99bd-da5b53d6ed6e&amp;t=2f400c66-0d27-8087-99bd-da5b53d6ed6e" alt="notion image" loading="lazy" decoding="async"/></div></figure></div></div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2f400c660d27802ea177f44cfe671c42" data-id="2f400c660d27802ea177f44cfe671c42"><span><div id="2f400c660d27802ea177f44cfe671c42" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f400c660d27802ea177f44cfe671c42" title="秩rank、轴axis、形状shape"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">秩rank、轴axis、形状shape</span></span></h3><div class="notion-text notion-block-2f400c660d278019a93ad914cf09ec0e">先秩后轴再形状，秩=轴（带方向的秩），形状（轴上的数量）</div><div class="notion-callout notion-gray_background_co notion-block-2f400c660d278044855bc42a04767865"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2f400c660d2780dc9b73e36a51e49cb9">秩：多少个秩，就用多少个索引来访问基本元素</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2f400c660d2780fd80e3f35a612ba7a4"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A14668dbb-961b-4011-aa8d-3ec42baef8ce%3Aimage.png?table=block&amp;id=2f400c66-0d27-80fd-80e3-f35a612ba7a4&amp;t=2f400c66-0d27-80fd-80e3-f35a612ba7a4" alt="notion image" loading="lazy" decoding="async"/></div></figure></div></div><div class="notion-callout notion-gray_background_co notion-block-2f400c660d278020805fc9888c36e80c"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2f400c660d2780d1a0b3e4f9225011f8">轴：方向</div><div class="notion-text notion-block-2f400c660d2780109808fb2085247568">下面这个例子，轴1（行）、轴2（列）</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2f400c660d2780a3a987fe68e43e1017"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Aa0fe7c19-2d9f-4d73-8251-8f674797dd26%3Aimage.png?table=block&amp;id=2f400c66-0d27-80a3-a987-fe68e43e1017&amp;t=2f400c66-0d27-80a3-a987-fe68e43e1017" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2f400c660d2780a0abefc2367ba1eb9e"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A66e7b219-23f1-4603-8a06-d873c8d7a6ac%3Aimage.png?table=block&amp;id=2f400c66-0d27-80a0-abef-c2367ba1eb9e&amp;t=2f400c66-0d27-80a0-abef-c2367ba1eb9e" alt="notion image" loading="lazy" decoding="async"/></div></figure></div></div><div class="notion-callout notion-gray_background_co notion-block-2f400c660d2780739041c5c5406f20e7"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2f400c660d2780068e01ce101a7b4a4e">形状：反应每个轴上的数量，告诉我们每个轴有多少个索引</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2f400c660d27806c96a3f93aa0bb88b0"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Af071d37c-fe03-40b3-a900-4a7d70ed14d9%3Aimage.png?table=block&amp;id=2f400c66-0d27-806c-96a3-f93aa0bb88b0&amp;t=2f400c66-0d27-806c-96a3-f93aa0bb88b0" alt="notion image" loading="lazy" decoding="async"/></div></figure></div></div><div class="notion-callout notion-gray_background_co notion-block-2f400c660d278081ba7ff6224fc9a2ee"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2f400c660d2780bd9055d72751fe5c62">改变形状：reshape()</div></div></div><div class="notion-text notion-block-2f400c660d27804aaab5c8f072fd3a89">下面是以上知识点的简明代码</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2f400c660d278048ada8f6d5f0c8ee92" data-id="2f400c660d278048ada8f6d5f0c8ee92"><span><div id="2f400c660d278048ada8f6d5f0c8ee92" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f400c660d278048ada8f6d5f0c8ee92" title="深入理解tensor"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">深入理解tensor</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2f400c660d2780c0a617d6bd1866f76b" data-id="2f400c660d2780c0a617d6bd1866f76b"><span><div id="2f400c660d2780c0a617d6bd1866f76b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f400c660d2780c0a617d6bd1866f76b" title="tensor形状理解：BCHW"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">tensor形状理解：BCHW</span></span></h4><div class="notion-text notion-block-2f400c660d27806cb4fafc6c766bc1f9">对应第七集</div><div class="notion-callout notion-gray_background_co notion-block-2f400c660d27809cab7fd5f73b544a83"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2f400c660d27808fb005eda561fdd3e8">输入形状是4，那么说明有4个秩，即4维，分别表示，batch、channel、height、weight</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2f400c660d2780d8a335c830f8e03d66"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A2ea11a1b-b280-4b85-9185-7f5eec0f9d59%3Aimage.png?table=block&amp;id=2f400c66-0d27-80d8-a335-c830f8e03d66&amp;t=2f400c66-0d27-80d8-a335-c830f8e03d66" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2f400c660d278033bececdbe6f7ff537"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A4d875932-d41f-450c-a1b2-d608340d2221%3Aimage.png?table=block&amp;id=2f400c66-0d27-8033-bece-cdbe6f7ff537&amp;t=2f400c66-0d27-8033-bece-cdbe6f7ff537" alt="notion image" loading="lazy" decoding="async"/></div></figure></div></div><div class="notion-callout notion-gray_background_co notion-block-2f400c660d278074a7aedc605c7543ef"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2f400c660d27806194a0df8d913bbd1e"><span class="notion-purple"><span class="notion-teal_background"><b><a class="notion-link" href="https://www.bilibili.com/list/watchlater?oid=499812223&amp;bvid=BV15K411N7CF" target="_blank" rel="noopener noreferrer">卷积的动画处理见第七集 5:21</a></b></span></span></div><div class="notion-text notion-block-2f400c660d278005b00fcc5eadae468c">经过卷积得到的不同channel的图也叫做特征图，比如下图里面右边的三个图</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2f400c660d278065b55dc89cadc9d0f1"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Ac24b035c-fce6-42e5-8851-9f826938561c%3Aimage.png?table=block&amp;id=2f400c66-0d27-8065-b55d-c89cadc9d0f1&amp;t=2f400c66-0d27-8065-b55d-c89cadc9d0f1" alt="notion image" loading="lazy" decoding="async"/></div></figure></div></div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2f400c660d27802da7fbf66154e68c30" data-id="2f400c660d27802da7fbf66154e68c30"><span><div id="2f400c660d27802da7fbf66154e68c30" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f400c660d27802da7fbf66154e68c30" title="tensor属性理解：DD"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">tensor属性理解：DD</span></span></h4><div class="notion-text notion-block-2f400c660d2780389ef3c6043862b25d">对应第八集</div><div class="notion-callout notion-gray_background_co notion-block-2f400c660d2780cbb722d75d96052a1d"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2f400c660d278014bd8efa20f559744d">datatype 即 torch.dtype()</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2f400c660d2780b4bb21cfb79a0e3147"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A6e60e1d0-c8e8-4322-beaf-d23f1af71d9f%3Aimage.png?table=block&amp;id=2f400c66-0d27-80b4-bb21-cfb79a0e3147&amp;t=2f400c66-0d27-80b4-bb21-cfb79a0e3147" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2f400c660d278073a07fe5aa64c160be">不同数据类型不能进行相互计算，必须统一</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2f400c660d2780529b58d7b75cd89f79"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Adb4fc728-a52b-4a11-a266-0507c0bfeb5c%3Aimage.png?table=block&amp;id=2f400c66-0d27-8052-9b58-d7b75cd89f79&amp;t=2f400c66-0d27-8052-9b58-d7b75cd89f79" alt="notion image" loading="lazy" decoding="async"/></div></figure></div></div><div class="notion-callout notion-gray_background_co notion-block-2f400c660d278053bdb5fdd5b047f4d7"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2f400c660d278048a64ef0fd6930d9aa">device 即 torch.device</div><div class="notion-text notion-block-2f400c660d2780238670fc45960dbe3b">同样，不同设备的数据不可进行相互计算</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2f400c660d2780cb83b1fb14764be0b2"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Ad048b7f1-992f-4369-9302-9406a3165bfc%3Aimage.png?table=block&amp;id=2f400c66-0d27-80cb-83b1-fb14764be0b2&amp;t=2f400c66-0d27-80cb-83b1-fb14764be0b2" alt="notion image" loading="lazy" decoding="async"/></div></figure></div></div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2f400c660d2780faa3e7e4c5b97a60eb" data-id="2f400c660d2780faa3e7e4c5b97a60eb"><span><div id="2f400c660d2780faa3e7e4c5b97a60eb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f400c660d2780faa3e7e4c5b97a60eb" title="tensor 数据创建"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">tensor 数据创建</span></span></h4><ul class="notion-list notion-list-disc notion-block-2f400c660d2780ba9905c9b979f97237"><li>np.array()</li></ul><ul class="notion-list notion-list-disc notion-block-2f400c660d27808881c0ffea06f1618c"><li>torch.Tensor()</li></ul><ul class="notion-list notion-list-disc notion-block-2f400c660d27808b8539eba455c629bf"><li>torch.tensor()</li></ul><ul class="notion-list notion-list-disc notion-block-2f400c660d2780d0941fe86ddcb3a606"><li>torch.as_tensor()</li></ul><ul class="notion-list notion-list-disc notion-block-2f400c660d2780c89140d3459421085c"><li>torch.from_numpy()</li></ul><div class="notion-blank notion-block-2f400c660d27809694ccc53e0ae5cff1"> </div><ul class="notion-list notion-list-disc notion-block-2f400c660d2780f3a7c9e60212b36ae8"><li>torch.eye()</li></ul><ul class="notion-list notion-list-disc notion-block-2f400c660d278061b5ffefddf45c3825"><li>torch.zeros()</li></ul><ul class="notion-list notion-list-disc notion-block-2f400c660d2780ab97efddb99715d13d"><li>torch.ones()</li></ul><ul class="notion-list notion-list-disc notion-block-2f400c660d2780cd96e3d86633b5d221"><li>torch.rand()</li></ul><div class="notion-callout notion-gray_background_co notion-block-2f400c660d2780ecbd48f4692e41c1dc"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2f400c660d2780a8986be6be74bc188a"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A0e74a56b-435b-4781-9225-34cda858588f%3Aimage.png?table=block&amp;id=2f400c66-0d27-80a8-986b-e6be74bc188a&amp;t=2f400c66-0d27-80a8-986b-e6be74bc188a" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2f400c660d27805bb51add05fa381ff5"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Ab876a106-f457-4cf7-a149-36cae9c0c698%3Aimage.png?table=block&amp;id=2f400c66-0d27-805b-b51a-dd05fa381ff5&amp;t=2f400c66-0d27-805b-b51a-dd05fa381ff5" alt="notion image" loading="lazy" decoding="async"/></div></figure></div></div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2f400c660d278015955addb6fcfbed3c" data-id="2f400c660d278015955addb6fcfbed3c"><span><div id="2f400c660d278015955addb6fcfbed3c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f400c660d278015955addb6fcfbed3c" title="tensor/numpy转换"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">tensor/numpy转换</span></span></h3><div class="notion-text notion-block-2f400c660d278001b5cce6fd38ac9a72">分为 copy 和 share 两种形式</div><div class="notion-callout notion-gray_background_co notion-block-2f400c660d2780c39d5fe8ff76e8dfc8"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2f400c660d2780769a6ec9a75106df91">copy 选 tensor，share 选 as_tensor</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2f400c660d278002a006ccb6a8ee7754"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A6fdaf7ee-6acd-40de-b666-73b363aa028a%3Aimage.png?table=block&amp;id=2f400c66-0d27-8002-a006-ccb6a8ee7754&amp;t=2f400c66-0d27-8002-a006-ccb6a8ee7754" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2f400c660d27802f9a37d68cfca7cefe"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Ad6d78645-1a47-4279-8d0c-82d2fba09b44%3Aimage.png?table=block&amp;id=2f400c66-0d27-802f-9a37-d68cfca7cefe&amp;t=2f400c66-0d27-802f-9a37-d68cfca7cefe" alt="notion image" loading="lazy" decoding="async"/></div></figure></div></div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2f400c660d2780509df9f435ac6abb4b" data-id="2f400c660d2780509df9f435ac6abb4b"><span><div id="2f400c660d2780509df9f435ac6abb4b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f400c660d2780509df9f435ac6abb4b" title="flatten/cat/stack 操作"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">flatten/cat/stack 操作</span></span></h3><div class="notion-callout notion-gray_background_co notion-block-2f400c660d27809f8412dc36f5eb597f"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2f400c660d2780e392fbc53397d90ed5">flatten的动画演示 见第11集 1:36</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2f400c660d27804cb2ddf3d6ed9e86cd"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:312.301808681672px"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A152c8bcc-d544-44d7-86aa-d50305de2f66%3A6852189a-aef2-4704-b7d6-54dbe3589bcf.png?table=block&amp;id=2f400c66-0d27-804c-b2dd-f3d6ed9e86cd&amp;t=2f400c66-0d27-804c-b2dd-f3d6ed9e86cd" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2f400c660d2780c5877be02abc5d30d5"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:216.28356368232224px"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Abea05416-b2e4-49a6-a260-aa8463524db2%3A5fa3b236-1b8c-4695-9efd-736f90e1e447.png?table=block&amp;id=2f400c66-0d27-80c5-877b-e02abc5d30d5&amp;t=2f400c66-0d27-80c5-877b-e02abc5d30d5" alt="notion image" loading="lazy" decoding="async"/></div></figure></div></div><div class="notion-callout notion-gray_background_co notion-block-2f400c660d27803baed8e172f8f873cc"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2f400c660d278091b57dec554216ddc4">理解图像tensor 见第11集 5:33</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2f400c660d278046b4e8f197c098507b"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A4094b9b2-0026-4130-b9af-ad2a115e565b%3Aimage.png?table=block&amp;id=2f400c66-0d27-8046-b4e8-f197c098507b&amp;t=2f400c66-0d27-8046-b4e8-f197c098507b" alt="notion image" loading="lazy" decoding="async"/></div></figure></div></div><div class="notion-callout notion-gray_background_co notion-block-2f400c660d2780b092a4f919135cd285"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2f400c660d27806eb7a9cf862f8536ef">选择性展平flatten，保留批次那一轴，展平其它轴</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2f400c660d27806e9515e941206979f2"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Ad08c3822-5605-4801-adee-0bf883495afc%3Aimage.png?table=block&amp;id=2f400c66-0d27-806e-9515-e941206979f2&amp;t=2f400c66-0d27-806e-9515-e941206979f2" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2f400c660d278001b709f2c1962cabd5"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Af10a5281-8f91-497c-b4e2-59f7fdb70f53%3Aimage.png?table=block&amp;id=2f400c66-0d27-8001-b709-f2c1962cabd5&amp;t=2f400c66-0d27-8001-b709-f2c1962cabd5" alt="notion image" loading="lazy" decoding="async"/></div></figure></div></div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2f400c660d27802b978bcf6ff0c8d2c8" data-id="2f400c660d27802b978bcf6ff0c8d2c8"><span><div id="2f400c660d27802b978bcf6ff0c8d2c8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f400c660d27802b978bcf6ff0c8d2c8" title="维度增减"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">维度增减</span></span></h3><div class="notion-blank notion-block-2f400c660d2780e0bd2fc92bec9a2c6e"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[深度学习2-预备知识_线性网络_多层感知机]]></title>
            <link>intro/article/dl2</link>
            <guid>intro/article/dl2</guid>
            <pubDate>Mon, 19 Jan 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[深度学习世界的入场券]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-2ed00c660d2780c28a8fc4c0b6ec6efc"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2ed00c660d2780e58149ca902940e86a" data-id="2ed00c660d2780e58149ca902940e86a"><span><div id="2ed00c660d2780e58149ca902940e86a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780e58149ca902940e86a" title="预备知识"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-purple"><span class="notion-pink_background">预备知识</span></span></span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2ed00c660d27809daea5fb0fcf918856" data-id="2ed00c660d27809daea5fb0fcf918856"><span><div id="2ed00c660d27809daea5fb0fcf918856" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27809daea5fb0fcf918856" title="一、数据操作+数据预处理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">一、数据操作+数据预处理</span></span></h3><div class="notion-text notion-block-2ed00c660d27808095cffe3921da808d">网课：<a class="notion-link" href="https://www.bilibili.com/video/BV1CV411Y7i4/" target="_blank" rel="noopener noreferrer">数据操作+数据预处理</a></div><div class="notion-text notion-block-2ed00c660d2780bc9916cf699c7ff4ee">深度学习<span class="notion-teal_background"><b>数据的主要形式</b></span>： <span class="notion-red"><span class="notion-yellow_background">N 维数组</span></span>，类似于多维列表</div><div class="notion-callout notion-gray_background_co notion-block-2ed00c660d2780bca5d6fecd7eb1f673"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2ed00c660d27809f9c02ca3ceea90baf"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A030925a6-e1d5-48d6-87cf-94198a724401%3Aimage.png?table=block&amp;id=2ed00c66-0d27-809f-9c02-ca3ceea90baf&amp;t=2ed00c66-0d27-809f-9c02-ca3ceea90baf" alt="notion image" loading="lazy" decoding="async"/></div></figure></div></div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2ed00c660d2780b197fef7cccbf2f456" data-id="2ed00c660d2780b197fef7cccbf2f456"><span><div id="2ed00c660d2780b197fef7cccbf2f456" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780b197fef7cccbf2f456" title="1.三维和四维数组"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1.三维和四维数组</span></span></h4><div class="notion-text notion-block-2ed00c660d27808e8a9bcca801c295eb">三维数组：一个图片的形状</div><div class="notion-text notion-block-2ed00c660d2780059869f9e36cbd9eba">四维数组：一批图片（batch）的形状</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2ed00c660d27802c9c31c6b28a685102" data-id="2ed00c660d27802c9c31c6b28a685102"><span><div id="2ed00c660d27802c9c31c6b28a685102" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27802c9c31c6b28a685102" title="2.访问元素"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2.访问元素</span></span></h4><div class="notion-callout notion-gray_background_co notion-block-2ed00c660d2780449985e3c975044e2e"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2ed00c660d2780a3aff4f1ae120e0c31"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Aef19e16d-cbaa-4642-86f6-a62b8e18c4a9%3Aimage.png?table=block&amp;id=2ed00c66-0d27-80a3-aff4-f1ae120e0c31&amp;t=2ed00c66-0d27-80a3-aff4-f1ae120e0c31" alt="notion image" loading="lazy" decoding="async"/></div></figure></div></div><div class="notion-text notion-block-2ed00c660d2780bc8b30c71bb8371852">这里说一下 子区域</div><div class="notion-text notion-block-2ed00c660d2780d7b8f8f8c10ce0a117">1:3 表示访问<span class="notion-teal_background"><b> [1,3) 区间</b></span>的行，::3 表示选取<span class="notion-teal_background"><b>所有行，但每3行选1个</b></span></div><div class="notion-text notion-block-2ed00c660d27800b996ceabbdaa8f7ed">格式：</div><div class="notion-callout notion-gray_background_co notion-block-2ed00c660d2780658f9addd3d1d30f1c"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2ed00c660d27805cbb54dedf9abf32dc"><span class="notion-red"><span class="notion-yellow_background">开始:结束:步长</span></span></div></div></div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2ed00c660d27806aaeb3d34f455093ff" data-id="2ed00c660d27806aaeb3d34f455093ff"><span><div id="2ed00c660d27806aaeb3d34f455093ff" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27806aaeb3d34f455093ff" title="3.在代码中实现数据创建"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3.在代码中实现数据创建</span></span></h4><div class="notion-callout notion-gray_background_co notion-block-2ed00c660d27806cad29cdeb48571819"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2ed00c660d27800bafbdcc2636d75c33"><b>顺序创建</b></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2ed00c660d27808b8ed5f6377a297cc3"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A7854666a-b5aa-4bbf-b67a-66f94a2bf8ba%3Aimage.png?table=block&amp;id=2ed00c66-0d27-808b-8ed5-f6377a297cc3&amp;t=2ed00c66-0d27-808b-8ed5-f6377a297cc3" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2ed00c660d27804fa964fc567d20ffd4"><b>形状检查、总数查询</b></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2ed00c660d27804f8423ff245e1a4bee"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A6accb28c-024a-49fd-ade0-3760027fbf8e%3Aimage.png?table=block&amp;id=2ed00c66-0d27-804f-8423-ff245e1a4bee&amp;t=2ed00c66-0d27-804f-8423-ff245e1a4bee" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2ed00c660d27800c942ad48dda533849"><b>形状改变</b></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2ed00c660d27806fbd0ff920333b9080"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A5bfb9744-1991-4230-825a-9a39ad555b1f%3Aimage.png?table=block&amp;id=2ed00c66-0d27-806f-bd0f-f920333b9080&amp;t=2ed00c66-0d27-806f-bd0f-f920333b9080" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2ed00c660d2780f39513dbd6b652c900"><b>全0全1</b></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2ed00c660d27800f9a52eb3682a7f2b6"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A12383694-b2b7-4ce3-b709-5d4a8fa0acf1%3Aimage.png?table=block&amp;id=2ed00c66-0d27-800f-9a52-eb3682a7f2b6&amp;t=2ed00c66-0d27-800f-9a52-eb3682a7f2b6" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2ed00c660d27802693b9d796b5bd8f73"><b>随机创建：</b></div><div class="notion-text notion-block-2ed00c660d278073a71ccbb7d276ff60">创建一个形状为（3,4）的张量。其中的每个元素都从均值为0、标准差为1的标准高斯分布（正态分布）中随机采样</div><div class="notion-text notion-block-2ed00c660d27804fa5f0fed21e735880"><b>创建嵌套张量，张量里套列表，列表作为元素</b></div></div></div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2ed00c660d2780ea9838d063e94875eb" data-id="2ed00c660d2780ea9838d063e94875eb"><span><div id="2ed00c660d2780ea9838d063e94875eb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780ea9838d063e94875eb" title="4.在代码中实现数据计算"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">4.在代码中实现数据计算</span></span></h4><div class="notion-callout notion-gray_background_co notion-block-2ed00c660d278062919fccbc7fdee77b"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2ed00c660d2780659f42d4038cadbdde"><span class="notion-teal_background"><b>加减乘除幂：</b></span></div><div class="notion-text notion-block-2ed00c660d2780bf8035e75c6b7f15c8">注意第一行第一个元素1.0，说明这是一个浮点张量</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2ed00c660d278015a275d94875bd6e88"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A3dc7c138-5de1-4455-99e7-2d7a2f865dea%3Aimage.png?table=block&amp;id=2ed00c66-0d27-8015-a275-d94875bd6e88&amp;t=2ed00c66-0d27-8015-a275-d94875bd6e88" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2ed00c660d27801dbe51ea7fa6e83f15"><span class="notion-teal_background"><b>取指：</b></span></div><div class="notion-text notion-block-2ed00c660d2780bf9e73df15f093e949">在 PyTorch 里，<code class="notion-inline-code">torch.exp(x)</code> 表示对张量 <code class="notion-inline-code">x</code> 的每一个元素取自然指数（e 的幂）。</div><div class="notion-text notion-block-2ed00c660d27808db3b4da45537299b9">也就是说，它做的是逐元素计算：<span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2ed00c660d278004ac4ccc2f42956a13"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:330.2708435058594px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A904a4582-e727-44d1-9efb-426f8bc9d897%3Aimage.png?table=block&amp;id=2ed00c66-0d27-8004-ac4c-cc2f42956a13&amp;t=2ed00c66-0d27-8004-ac4c-cc2f42956a13" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2f600c660d278048a320e5484011f6ed"><span class="notion-teal_background"><b>求和：</b></span></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2ed00c660d2780ab8d3fc304a3a3fa45"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Aca92806c-057b-420f-ae87-4a43369fecaa%3Aimage.png?table=block&amp;id=2ed00c66-0d27-80ab-8d3f-c304a3a3fa45&amp;t=2ed00c66-0d27-80ab-8d3f-c304a3a3fa45" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2ed00c660d2780da9689db231ee3ffcb"><span class="notion-teal_background"><b>广播：</b></span></div><div class="notion-text notion-block-2ed00c660d2780e48584dd44dd24d6f7">注意，广播机制要求 <b>维度 </b>一样</div><div class="notion-text notion-block-2ed00c660d2780bbb2c4c83c5056da2b">下面的例子，a 扩展成 0,0 1,1 2,2 与 b 相加</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2ed00c660d27804a87b0d0b7a6faf6ef"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A3b1b67d9-49fb-4597-a1b0-51c4d20818bc%3Aimage.png?table=block&amp;id=2ed00c66-0d27-804a-87b0-d0b7a6faf6ef&amp;t=2ed00c66-0d27-804a-87b0-d0b7a6faf6ef" alt="notion image" loading="lazy" decoding="async"/></div></figure></div></div><details class="notion-toggle notion-block-2ed00c660d2780c38ccbfc42d3b612ea"><summary>重点讲讲<b>torch.cat（展开阅读）</b></summary><div><blockquote class="notion-quote notion-block-2ed00c660d2780929776f7d949e33ca6"><div>torch.cat(tensors, dim=?)</div><div class="notion-text notion-block-2ed00c660d2780aa9318fc0d03715355">就是：<b>沿着第 </b><code class="notion-inline-code"><b>dim</b></code><b> 这个维度，把张量“接”起来</b>。</div></blockquote><hr class="notion-hr notion-block-2ed00c660d27805399a7fa5ee59be642"/><h3 class="notion-h notion-h2 notion-block-2ed00c660d27803d9a59f1e7008ff201" data-id="2ed00c660d27803d9a59f1e7008ff201"><span><div id="2ed00c660d27803d9a59f1e7008ff201" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27803d9a59f1e7008ff201" title="一、2D 情况（最常见）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">一、2D 情况（最常见）</span></span></h3><div class="notion-text notion-block-2ed00c660d2780c5a041c2b96fa2ea1b">假设两个 2D 张量：</div><h4 class="notion-h notion-h3 notion-block-2ed00c660d2780878d8ad4ec0ec73271" data-id="2ed00c660d2780878d8ad4ec0ec73271"><span><div id="2ed00c660d2780878d8ad4ec0ec73271" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780878d8ad4ec0ec73271" title="1）dim=0：按“行”往下接（竖着接）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1）<code class="notion-inline-code">dim=0</code>：按“行”往下接（竖着接）</span></span></h4><div class="notion-text notion-block-2ed00c660d2780338a9ee7ac1493ffa2">结果：</div><div class="notion-text notion-block-2ed00c660d27808d9ba0c4adca6acebf">shape 变化：</div><hr class="notion-hr notion-block-2ed00c660d278074b178c385f5fd33c8"/><h4 class="notion-h notion-h3 notion-block-2ed00c660d27803b81ecc08be5755d71" data-id="2ed00c660d27803b81ecc08be5755d71"><span><div id="2ed00c660d27803b81ecc08be5755d71" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27803b81ecc08be5755d71" title="2）dim=1：按“列”往右接（横着接）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2）<code class="notion-inline-code">dim=1</code>：按“列”往右接（横着接）</span></span></h4><div class="notion-text notion-block-2ed00c660d27800f9925fc40fca06859">结果：</div><div class="notion-text notion-block-2ed00c660d2780a596ccd54c82808046">shape 变化：</div><hr class="notion-hr notion-block-2ed00c660d27808c9c6cd2089c9b1436"/><h3 class="notion-h notion-h2 notion-block-2ed00c660d27809b97bbf557b615f871" data-id="2ed00c660d27809b97bbf557b615f871"><span><div id="2ed00c660d27809b97bbf557b615f871" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27809b97bbf557b615f871" title="二、3D 情况（比如 batch × 高 × 宽）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">二、3D 情况（比如 batch × 高 × 宽）</span></span></h3><div class="notion-text notion-block-2ed00c660d27804da541c57f35bc43b2">两个 3D 张量：</div><div class="notion-text notion-block-2ed00c660d27803fb02bee5dd903b73c">维度含义可以想成：</div><hr class="notion-hr notion-block-2ed00c660d278057a48bdc4e918a9114"/><h4 class="notion-h notion-h3 notion-block-2ed00c660d278040b7d7d37f84318cf5" data-id="2ed00c660d278040b7d7d37f84318cf5"><span><div id="2ed00c660d278040b7d7d37f84318cf5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278040b7d7d37f84318cf5" title="1）dim=0：batch 维拼接（样本数变多）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1）<code class="notion-inline-code">dim=0</code>：batch 维拼接（样本数变多）</span></span></h4><div class="notion-text notion-block-2ed00c660d278032b753f60f289a91b3">shape：</div><div class="notion-text notion-block-2ed00c660d278074ad40da23ea029f48">直觉：</div><div class="notion-text notion-block-2ed00c660d2780659e60c78484f6012d">👉 两批数据合成一大批</div><hr class="notion-hr notion-block-2ed00c660d2780598778e34483634ca6"/><h4 class="notion-h notion-h3 notion-block-2ed00c660d2780b78aa9ef13d1ffeba5" data-id="2ed00c660d2780b78aa9ef13d1ffeba5"><span><div id="2ed00c660d2780b78aa9ef13d1ffeba5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780b78aa9ef13d1ffeba5" title="2）dim=1：在“中间那一维”拼"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2）<code class="notion-inline-code">dim=1</code>：在“中间那一维”拼</span></span></h4><div class="notion-text notion-block-2ed00c660d27805c823af6a45501127b">shape：</div><div class="notion-text notion-block-2ed00c660d27808d82f9ca1dd32744c0">👉 每个样本里，把“高度”翻倍</div><hr class="notion-hr notion-block-2ed00c660d27809da082e3617ac149e7"/><h4 class="notion-h notion-h3 notion-block-2ed00c660d2780dcabcbedef47394957" data-id="2ed00c660d2780dcabcbedef47394957"><span><div id="2ed00c660d2780dcabcbedef47394957" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780dcabcbedef47394957" title="3）dim=2：在最后一维拼"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3）<code class="notion-inline-code">dim=2</code>：在最后一维拼</span></span></h4><div class="notion-text notion-block-2ed00c660d278044bcc9ead26dd8b79c">shape：</div><div class="notion-text notion-block-2ed00c660d278067b899fdac09ec68a9">👉 每个样本里，把“宽度”翻倍</div><hr class="notion-hr notion-block-2ed00c660d2780ba811cfd63d03813bc"/><h3 class="notion-h notion-h2 notion-block-2ed00c660d278057a418d03aade80747" data-id="2ed00c660d278057a418d03aade80747"><span><div id="2ed00c660d278057a418d03aade80747" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278057a418d03aade80747" title="三、最重要的一条规则 ⭐"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">三、最重要的一条规则 ⭐</span></span></h3><blockquote class="notion-quote notion-block-2ed00c660d2780e08ea4f459479b9317"><div>除了 dim 那一维以外，其它所有维度必须完全相同。</div></blockquote><div class="notion-text notion-block-2ed00c660d278010917aed42462cef61">比如：</div><ul class="notion-list notion-list-disc notion-block-2ed00c660d27801c9107fd448797aa9f"><li><code class="notion-inline-code">(2, 3, 4)</code> 和 <code class="notion-inline-code">(2, 5, 4)</code></li><ul class="notion-list notion-list-disc notion-block-2ed00c660d27801c9107fd448797aa9f"><div class="notion-text notion-block-2ed00c660d2780a6a5dcc3cb7f3cf55b">👉 只能 <code class="notion-inline-code">dim=1</code> 拼</div></ul></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d278052854acab1f2af1d2e"><li><code class="notion-inline-code">(2, 3, 4)</code> 和 <code class="notion-inline-code">(3, 3, 4)</code></li><ul class="notion-list notion-list-disc notion-block-2ed00c660d278052854acab1f2af1d2e"><div class="notion-text notion-block-2ed00c660d2780039032ef05a7d159cc">👉 只能 <code class="notion-inline-code">dim=0</code> 拼</div></ul></ul></div></details><details class="notion-toggle notion-block-2ed00c660d27807e8c68e7b2b2629317"><summary>再讲讲通过 <b>X == Y 构建二元张量</b>，这也包含了广播机制（展开阅读）</summary><div><h3 class="notion-h notion-h2 notion-block-2ed00c660d278084afcbf451a884d9eb" data-id="2ed00c660d278084afcbf451a884d9eb"><span><div id="2ed00c660d278084afcbf451a884d9eb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278084afcbf451a884d9eb" title="基本用法"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">基本用法</span></span></h3><div class="notion-text notion-block-2ed00c660d2780cb8887d1eafea210b0">输出：</div><div class="notion-text notion-block-2ed00c660d2780619b5cea1440647cd5">👉 对应位置元素是否相等。</div><hr class="notion-hr notion-block-2ed00c660d2780f4a5fcc5d21c342a7e"/><h3 class="notion-h notion-h2 notion-block-2ed00c660d27806f8c16c056a01b6aba" data-id="2ed00c660d27806f8c16c056a01b6aba"><span><div id="2ed00c660d27806f8c16c056a01b6aba" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27806f8c16c056a01b6aba" title="如果我想判断“整体是否完全相等”呢？"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">如果我想判断“整体是否完全相等”呢？</span></span></h3><hr class="notion-hr notion-block-2ee00c660d27803fb23fcccfc0130af7"/><h4 class="notion-h notion-h3 notion-block-2ed00c660d278018a910e44cb196e746" data-id="2ed00c660d278018a910e44cb196e746"><span><div id="2ed00c660d278018a910e44cb196e746" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278018a910e44cb196e746" title="✅ 正确方式 1：torch.equal"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">✅ 正确方式 1：<code class="notion-inline-code">torch.equal</code></span></span></h4><div class="notion-text notion-block-2ed00c660d2780449d86e357baf8d8ac">返回：</div><div class="notion-text notion-block-2ed00c660d278066862dc43a00cb291a">要求：</div><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780fa8fdbefe4d2d9d174"><li>形状一样</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d27809e81b5e1b9a846d0c2"><li>每个元素都一样</li></ul><hr class="notion-hr notion-block-2ed00c660d27806cb166fc7447ed7163"/><h4 class="notion-h notion-h3 notion-block-2ed00c660d27809ca2e2dbeb7bba1044" data-id="2ed00c660d27809ca2e2dbeb7bba1044"><span><div id="2ed00c660d27809ca2e2dbeb7bba1044" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27809ca2e2dbeb7bba1044" title="✅ 正确方式 2：结合 .all()"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">✅ 正确方式 2：结合 <code class="notion-inline-code">.all()</code></span></span></h4><div class="notion-text notion-block-2ed00c660d278054ac0dc06be3830538">返回：</div><div class="notion-text notion-block-2ed00c660d27802faacccb2b95add3b2">如果你想变成 Python 的 bool：</div><hr class="notion-hr notion-block-2ed00c660d278053881ced1fbedb6b59"/><h3 class="notion-h notion-h2 notion-block-2ed00c660d2780e0835ddeb88f5ea8c6" data-id="2ed00c660d2780e0835ddeb88f5ea8c6"><span><div id="2ed00c660d2780e0835ddeb88f5ea8c6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780e0835ddeb88f5ea8c6" title="广播（broadcast）情况下的 X == Y"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">广播（broadcast）情况下的 <code class="notion-inline-code">X == Y</code></span></span></h3><div class="notion-text notion-block-2ed00c660d27809fbfd2dc5e3d0c21da">这个也很常见 👇</div><div class="notion-text notion-block-2ed00c660d2780188771e59508d6c3fb">输出：</div><div class="notion-text notion-block-2ed00c660d2780a5ac79fd5789433008">规则：</div><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780e79e69e843ad548f39"><li><code class="notion-inline-code">Y</code> 会被自动“扩展”为：</li><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780e79e69e843ad548f39"></ul></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d278016bcc6d84a98fb36e7"><li>然后再逐元素比较。</li></ul><hr class="notion-hr notion-block-2ed00c660d27800794bff40325dcab71"/><h3 class="notion-h notion-h2 notion-block-2ed00c660d27802ba38acff2287acfc2" data-id="2ed00c660d27802ba38acff2287acfc2"><span><div id="2ed00c660d27802ba38acff2287acfc2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27802ba38acff2287acfc2" title="典型用途（你以后一定会见到）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">典型用途（你以后一定会见到）</span></span></h3><h4 class="notion-h notion-h3 notion-block-2ed00c660d27800d98dac7ecbea163dd" data-id="2ed00c660d27800d98dac7ecbea163dd"><span><div id="2ed00c660d27800d98dac7ecbea163dd" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27800d98dac7ecbea163dd" title="1）做 mask（掩码）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1）做 mask（掩码）</span></span></h4><div class="notion-text notion-block-2ed00c660d27803fa67ed583ee4b3760">👉 表示哪些位置等于 1。</div><hr class="notion-hr notion-block-2ed00c660d2780fba590e5be22c2e14a"/><h4 class="notion-h notion-h3 notion-block-2ed00c660d27806087e8da8a229db41e" data-id="2ed00c660d27806087e8da8a229db41e"><span><div id="2ed00c660d27806087e8da8a229db41e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27806087e8da8a229db41e" title="2）统计相等的个数（比如算准确率）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2）统计相等的个数（比如算准确率）</span></span></h4></div></details><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2ed00c660d27802abd29da5fcbc68db0" data-id="2ed00c660d27802abd29da5fcbc68db0"><span><div id="2ed00c660d27802abd29da5fcbc68db0" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27802abd29da5fcbc68db0" title="5.在代码中实现数据元素访问"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">5.在代码中实现数据元素访问</span></span></h4><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2ed00c660d27809fa071f2c0e8e559c0" data-id="2ed00c660d27809fa071f2c0e8e559c0"><span><div id="2ed00c660d27809fa071f2c0e8e559c0" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27809fa071f2c0e8e559c0" title="二、线性代数"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>二、线性代数</b></span></span></h3><div class="notion-text notion-block-2ed00c660d27809db47cd4cfdc81ec70">我只整理了必备的知识，有些和上面的重复了，就当作复习吧</div><details class="notion-toggle notion-block-2ed00c660d2780d0bd59c5865afc75e0"><summary><span class="notion-blue"><span class="notion-purple_background">深度学习中，线性代数必备知识点（展开阅读）</span></span></summary><div><h3 class="notion-h notion-h2 notion-block-2ed00c660d278042bec7c559f442ffa0" data-id="2ed00c660d278042bec7c559f442ffa0"><span><div id="2ed00c660d278042bec7c559f442ffa0" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278042bec7c559f442ffa0" title="1️⃣ 张量的形状与广播"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1️⃣ 张量的形状与广播</span></span></h3><hr class="notion-hr notion-block-2ee00c660d2780b8b2dbf61f5ff26e15"/><h4 class="notion-h notion-h3 notion-block-2ed00c660d2780b89da4f44d046559f8" data-id="2ed00c660d2780b89da4f44d046559f8"><span><div id="2ed00c660d2780b89da4f44d046559f8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780b89da4f44d046559f8" title="数学理解："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">数学理解：</span></span></h4><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780fa91d1e4a98f46324e"><li>张量可以看成多维矩阵</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d27805da0e2e87cd4baf441"><li>广播规则：形状从末尾对齐，不同维度可扩展为一致形状</li></ul><h4 class="notion-h notion-h3 notion-block-2ed00c660d2780589b26d989aece6a41" data-id="2ed00c660d2780589b26d989aece6a41"><span><div id="2ed00c660d2780589b26d989aece6a41" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780589b26d989aece6a41" title="例子："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">例子：</span></span></h4><h4 class="notion-h notion-h3 notion-block-2ed00c660d27806eaff3d5e91ad16895" data-id="2ed00c660d27806eaff3d5e91ad16895"><span><div id="2ed00c660d27806eaff3d5e91ad16895" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27806eaff3d5e91ad16895" title="输出："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>输出：</b></span></span></h4><blockquote class="notion-quote notion-block-2ed00c660d27803b9b88c37368fba4e8"><div>广播很重要：卷积、注意力机制里经常用它来加 bias 或 mask。</div></blockquote><hr class="notion-hr notion-block-2ed00c660d278025968ef67c05765b36"/><h3 class="notion-h notion-h2 notion-block-2ed00c660d2780f3a28fc709e567eea1" data-id="2ed00c660d2780f3a28fc709e567eea1"><span><div id="2ed00c660d2780f3a28fc709e567eea1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780f3a28fc709e567eea1" title="2️⃣ 矩阵乘法"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2️⃣ 矩阵乘法</span></span></h3><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780ee9772cdf27f2dc5bb"><li><b>规则</b>：左矩阵列数 = 右矩阵行数</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d278099a502f4ebf6345967"><li><b>结果</b>：左矩阵行数 × 右矩阵列数</li></ul><h4 class="notion-h notion-h3 notion-block-2ed00c660d2780739c0dd7925cab173f" data-id="2ed00c660d2780739c0dd7925cab173f"><span><div id="2ed00c660d2780739c0dd7925cab173f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780739c0dd7925cab173f" title="例子："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">例子：</span></span></h4><h4 class="notion-h notion-h3 notion-block-2ed00c660d27806f85cce1c550be508a" data-id="2ed00c660d27806f85cce1c550be508a"><span><div id="2ed00c660d27806f85cce1c550be508a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27806f85cce1c550be508a" title="输出："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>输出：</b></span></span></h4><blockquote class="notion-quote notion-block-2ed00c660d278099b072d0d04ce10ae1"><div>用于全连接层、注意力计算 Q·K^T 等。</div></blockquote><hr class="notion-hr notion-block-2ed00c660d2780508f3fe1fcf211a8f1"/><h3 class="notion-h notion-h2 notion-block-2ed00c660d2780638165e14ef22f1728" data-id="2ed00c660d2780638165e14ef22f1728"><span><div id="2ed00c660d2780638165e14ef22f1728" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780638165e14ef22f1728" title="3️⃣ 转置与维度变换"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3️⃣ 转置与维度变换</span></span></h3><hr class="notion-hr notion-block-2ee00c660d27809ba1e6f7fc065b2414"/><h4 class="notion-h notion-h3 notion-block-2ed00c660d2780fb98dad92624d5cdaa" data-id="2ed00c660d2780fb98dad92624d5cdaa"><span><div id="2ed00c660d2780fb98dad92624d5cdaa" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780fb98dad92624d5cdaa" title="数学理解："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">数学理解：</span></span></h4><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780f29453daba5d86ee9b"><li>转置就是行列互换</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780f7a973e5d6a7bd7473"><li>permute 可以任意调整多维张量维度顺序</li></ul><h4 class="notion-h notion-h3 notion-block-2ed00c660d278087a645c60f9dfb36cb" data-id="2ed00c660d278087a645c60f9dfb36cb"><span><div id="2ed00c660d278087a645c60f9dfb36cb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278087a645c60f9dfb36cb" title="例子："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">例子：</span></span></h4><h4 class="notion-h notion-h3 notion-block-2ed00c660d2780c4a692e7a105cdd456" data-id="2ed00c660d2780c4a692e7a105cdd456"><span><div id="2ed00c660d2780c4a692e7a105cdd456" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780c4a692e7a105cdd456" title="输出："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>输出：</b></span></span></h4><blockquote class="notion-quote notion-block-2ed00c660d2780c59e99d182c7c0f1c3"><div>卷积或注意力里经常需要 permute 来对齐维度。</div></blockquote><hr class="notion-hr notion-block-2ed00c660d278027bfeafe16134891ca"/><h3 class="notion-h notion-h2 notion-block-2ed00c660d2780afb7a8e91e7e8bd216" data-id="2ed00c660d2780afb7a8e91e7e8bd216"><span><div id="2ed00c660d2780afb7a8e91e7e8bd216" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780afb7a8e91e7e8bd216" title="4️⃣ 点积 / 内积"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">4️⃣ 点积 / 内积</span></span></h3><hr class="notion-hr notion-block-2ee00c660d2780d9bccfd70873c49e83"/><h4 class="notion-h notion-h3 notion-block-2ed00c660d2780fd8681ce97f9d711ed" data-id="2ed00c660d2780fd8681ce97f9d711ed"><span><div id="2ed00c660d2780fd8681ce97f9d711ed" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780fd8681ce97f9d711ed" title="数学理解："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">数学理解：</span></span></h4><ul class="notion-list notion-list-disc notion-block-2ed00c660d278086b406c89b48102ebe"><li>两个向量长度相同，逐元素相乘再求和</li></ul><h4 class="notion-h notion-h3 notion-block-2ed00c660d2780b096fcd969443a5d3b" data-id="2ed00c660d2780b096fcd969443a5d3b"><span><div id="2ed00c660d2780b096fcd969443a5d3b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780b096fcd969443a5d3b" title="例子："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">例子：</span></span></h4><h4 class="notion-h notion-h3 notion-block-2ed00c660d278064acafdc3ff8dc2245" data-id="2ed00c660d278064acafdc3ff8dc2245"><span><div id="2ed00c660d278064acafdc3ff8dc2245" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278064acafdc3ff8dc2245" title="输出："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>输出：</b></span></span></h4><blockquote class="notion-quote notion-block-2ed00c660d278064953fc05bf928bb2e"><div>注意力机制里的 Q·K 就是大量点积。</div></blockquote><hr class="notion-hr notion-block-2ed00c660d278089b8aee1667fbbb78d"/><h3 class="notion-h notion-h2 notion-block-2ed00c660d278079b4adf4f87be2e8df" data-id="2ed00c660d278079b4adf4f87be2e8df"><span><div id="2ed00c660d278079b4adf4f87be2e8df" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278079b4adf4f87be2e8df" title="5️⃣ 范数（Norm / Vector Length）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">5️⃣ 范数（Norm / Vector Length）</span></span></h3><hr class="notion-hr notion-block-2ee00c660d27808e844bc914d0c9a4e5"/><h4 class="notion-h notion-h3 notion-block-2ed00c660d27806ea6bee302d8ca312d" data-id="2ed00c660d27806ea6bee302d8ca312d"><span><div id="2ed00c660d27806ea6bee302d8ca312d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27806ea6bee302d8ca312d" title="数学理解："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">数学理解：</span></span></h4><ul class="notion-list notion-list-disc notion-block-2ed00c660d278032a6a7fab4a09111d9"><li>向量长度/大小</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780548b2cc8d2c3d673a7"><li>常用 L2 范数：sqrt(sum(x_i^2))</li></ul><h4 class="notion-h notion-h3 notion-block-2ed00c660d278061bae1fbd95fc90098" data-id="2ed00c660d278061bae1fbd95fc90098"><span><div id="2ed00c660d278061bae1fbd95fc90098" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278061bae1fbd95fc90098" title="例子："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">例子：</span></span></h4><div class="notion-text notion-block-2ed00c660d278037acc1d1676d7ed8cf">输出：</div><blockquote class="notion-quote notion-block-2ed00c660d2780deaf78f2a23990c1ce"><div>用于归一化（比如 LayerNorm、Attention Scoring）。</div></blockquote><hr class="notion-hr notion-block-2ed00c660d2780bc8b16cb884f9ee28b"/><h3 class="notion-h notion-h2 notion-block-2ed00c660d2780519d70f60667206bfe" data-id="2ed00c660d2780519d70f60667206bfe"><span><div id="2ed00c660d2780519d70f60667206bfe" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780519d70f60667206bfe" title="6️⃣ 元素级运算"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">6️⃣ 元素级运算</span></span></h3><hr class="notion-hr notion-block-2ee00c660d2780ba956bde5f97572c0e"/><h4 class="notion-h notion-h3 notion-block-2ed00c660d278030877cd75294639648" data-id="2ed00c660d278030877cd75294639648"><span><div id="2ed00c660d278030877cd75294639648" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278030877cd75294639648" title="数学理解："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">数学理解：</span></span></h4><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780c3ba8fddd546a42f54"><li>+, -, *, / 对应元素逐个计算</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780b9b051e99128d549b6"><li>和矩阵乘法不同，不是线性代数意义上的乘法</li></ul><h4 class="notion-h notion-h3 notion-block-2ed00c660d278024a05bc446fb2f34d5" data-id="2ed00c660d278024a05bc446fb2f34d5"><span><div id="2ed00c660d278024a05bc446fb2f34d5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278024a05bc446fb2f34d5" title="例子："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">例子：</span></span></h4><div class="notion-text notion-block-2ed00c660d2780bb97c2d3cb43f7939f">输出：</div><blockquote class="notion-quote notion-block-2ed00c660d27809b9fdfeb3f54a3f5d4"><div>卷积里的 Hadamard 乘积、残差连接中经常用。</div></blockquote><hr class="notion-hr notion-block-2ed00c660d2780aaa94af026b56ef182"/><h3 class="notion-h notion-h2 notion-block-2ed00c660d27800bb884ef496108fa0d" data-id="2ed00c660d27800bb884ef496108fa0d"><span><div id="2ed00c660d27800bb884ef496108fa0d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27800bb884ef496108fa0d" title="7️⃣ 求和 / 平均 / 归一化（Sum / Mean / Softmax）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">7️⃣ 求和 / 平均 / 归一化（Sum / Mean / Softmax）</span></span></h3><hr class="notion-hr notion-block-2ee00c660d2780af864acab3cb867dd8"/><h4 class="notion-h notion-h3 notion-block-2ed00c660d2780118efefbfdb4864dfc" data-id="2ed00c660d2780118efefbfdb4864dfc"><span><div id="2ed00c660d2780118efefbfdb4864dfc" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780118efefbfdb4864dfc" title="数学理解："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">数学理解：</span></span></h4><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780dbb425c41447de867d"><li>对张量按某维求和 / 平均</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d27801496f3ff7644f35c0d"><li>softmax 将向量归一化成概率分布</li></ul><h4 class="notion-h notion-h3 notion-block-2ed00c660d2780b8b9ebfa16322ccd39" data-id="2ed00c660d2780b8b9ebfa16322ccd39"><span><div id="2ed00c660d2780b8b9ebfa16322ccd39" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780b8b9ebfa16322ccd39" title="例子："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">例子：</span></span></h4><div class="notion-text notion-block-2ed00c660d2780269320f41a859e014f">输出：</div><div class="notion-text notion-block-2ed00c660d2780969300fb0dfe208ece">特别说明softmax，它也常常用于2维：</div><div class="notion-callout notion-gray_background_co notion-block-2ed00c660d2780ab82f4d7b8cc70980a"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2ed00c660d2780139a19d49fdd38f92c"><b>计算过程：</b></div><div class="notion-text notion-block-2ed00c660d278039ba01da8d02daeb5a"><b>dim=0 ：</b></div><div class="notion-text notion-block-2ed00c660d278035a67edcddd0b9e0e4">意味着我们沿着第0维（行方向）计算softmax，对<b>每一列</b>分别计算：</div><ul class="notion-list notion-list-disc notion-block-2ed00c660d27801983f8c85c436269f5"><li><b>第0列</b>：[1.0, 4.0]</li><ul class="notion-list notion-list-disc notion-block-2ed00c660d27801983f8c85c436269f5"><li>exp(1.0) = 2.7183, </li><li>exp(4.0) = 54.5982</li><li>总和 = 57.3165</li><li>softmax = [2.7183/57.3165, 54.5982/57.3165] = [0.0474, 0.9526]</li></ul></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780faa6bbc233fc03fdbd"><li><b>第1列</b>：[2.0, 5.0]</li><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780faa6bbc233fc03fdbd"><li>exp(2.0) = 7.3891, </li><li>exp(5.0) = 148.4132</li><li>总和 = 155.8023</li><li>softmax = [7.3891/155.8023, 148.4132/155.8023] = [0.0474, 0.9526]</li></ul></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d27806880a1fabe33d4fe7d"><li><b>第2列</b>：[3.0, 6.0]</li><ul class="notion-list notion-list-disc notion-block-2ed00c660d27806880a1fabe33d4fe7d"><li>exp(3.0) = 20.0855, </li><li>exp(6.0) = 403.4288</li><li>总和 = 423.5143</li><li>softmax = [20.0855/423.5143, 403.4288/423.5143] = [0.0474, 0.9526]</li></ul></ul><div class="notion-text notion-block-2ed00c660d2780259aabe017a448ca69"><b>dim=1 ：</b></div><div class="notion-text notion-block-2ed00c660d2780a9bab4f370465585a7">意味着我们沿着第1维（列方向）计算softmax，对<b>每一行</b>分别计算：</div><ul class="notion-list notion-list-disc notion-block-2ed00c660d278038a34fe91f60b7c937"><li><b>第0行</b>：[1.0, 2.0, 3.0]</li><ul class="notion-list notion-list-disc notion-block-2ed00c660d278038a34fe91f60b7c937"><li>exp(1.0) = 2.7183, </li><li>exp(2.0) = 7.3891, </li><li>exp(3.0) = 20.0855</li><li>总和 = 30.1929</li><li>softmax = [0.0900, 0.2447, 0.6652]</li></ul></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780dd8ca3f168b4df79ee"><li><b>第1行</b>：[4.0, 5.0, 6.0]</li><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780dd8ca3f168b4df79ee"><li>exp(4.0) = 54.5982, </li><li>exp(5.0) = 148.4132, </li><li>exp(6.0) = 403.4288</li><li>总和 = 606.4402</li><li>softmax = [0.0900, 0.2447, 0.6652]</li></ul></ul></div></div><blockquote class="notion-quote notion-block-2ed00c660d27800088faec52a4f268b3"><div>Transformer 里 attention 权重就是 softmax。</div></blockquote><hr class="notion-hr notion-block-2ed00c660d2780e590c6f5dfe31d3939"/><h3 class="notion-h notion-h2 notion-block-2ed00c660d278063817ff1e42db18fb4" data-id="2ed00c660d278063817ff1e42db18fb4"><span><div id="2ed00c660d278063817ff1e42db18fb4" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278063817ff1e42db18fb4" title="总结 ✅"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">总结 ✅</span></span></h3><div class="notion-text notion-block-2ed00c660d2780f3b5d5d363add793af"><b>深度学习必备线性代数</b>：</div><table class="notion-simple-table notion-block-2ed00c660d27804e8facecc8179375d6"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-2ed00c660d2780b0b078e068c58ac1a3"><td class="" style="width:120px"><div class="notion-simple-table-cell">知识点</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">用途</div></td></tr><tr class="notion-simple-table-row notion-block-2ed00c660d2780d6bd29f66ee71eb714"><td class="" style="width:120px"><div class="notion-simple-table-cell">张量形状 &amp; 广播</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">卷积 / add bias / mask</div></td></tr><tr class="notion-simple-table-row notion-block-2ed00c660d2780f4a300d6dd31b7a01f"><td class="" style="width:120px"><div class="notion-simple-table-cell">矩阵乘法</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">全连接 / 注意力 QK^T</div></td></tr><tr class="notion-simple-table-row notion-block-2ed00c660d27809fad96e7785dd16e47"><td class="" style="width:120px"><div class="notion-simple-table-cell">转置 &amp; permute</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">卷积 / Transformer 维度对齐</div></td></tr><tr class="notion-simple-table-row notion-block-2ed00c660d278081b6d9d920dd4a181e"><td class="" style="width:120px"><div class="notion-simple-table-cell">点积 / 内积</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">注意力机制</div></td></tr><tr class="notion-simple-table-row notion-block-2ed00c660d278069b20fec87e1a34fe4"><td class="" style="width:120px"><div class="notion-simple-table-cell">范数 / 归一化</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">LayerNorm / attention scaling</div></td></tr><tr class="notion-simple-table-row notion-block-2ed00c660d27802396daf331d87545d7"><td class="" style="width:120px"><div class="notion-simple-table-cell">元素级运算</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">卷积 Hadamard / 残差连接</div></td></tr><tr class="notion-simple-table-row notion-block-2ed00c660d278013bfc4dd3de402d094"><td class="" style="width:120px"><div class="notion-simple-table-cell">求和 / 平均 / softmax</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">注意力 / 归一化 / loss</div></td></tr></tbody></table></div></details><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2ed00c660d27801998c2fe9ab8a78a42" data-id="2ed00c660d27801998c2fe9ab8a78a42"><span><div id="2ed00c660d27801998c2fe9ab8a78a42" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27801998c2fe9ab8a78a42" title="1、特定轴的求和 A.sum(dim=?)"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-red"><span class="notion-yellow_background"><b>1、特定轴的求和 A.sum(dim=?)</b></span></span></span></span></h4><blockquote class="notion-quote notion-block-2ed00c660d27807bafb8fa4e07fe2eca"><div><span class="notion-yellow_background"><b>例子1：2D矩阵（2行×3列）</b></span></div></blockquote><div class="notion-text notion-block-2ed00c660d2780e7a79dedd2132c9369"><b>axis=0（跨行求和，行压缩）：</b></div><div class="notion-text notion-block-2ed00c660d278069b279dc5c7ed41c7c"><b>axis=1（跨列求和，列压缩）：</b></div><hr class="notion-hr notion-block-2ed00c660d27801c9b61d06dc530d4c7"/><blockquote class="notion-quote notion-block-2ed00c660d2780f78af8d547f37be038"><div><span class="notion-yellow_background"><b>例子2：3D张量（像一本书：2页×3行×4列）</b></span></div></blockquote><div class="notion-text notion-block-2ed00c660d2780b9a7e1cf7f89c516f4"><b>axis=0（跨页求和，书变薄）：</b></div><div class="notion-text notion-block-2ed00c660d27804b9ee4dd536810a28a"><b>axis=1（跨行求和，书变矮）：</b></div><div class="notion-text notion-block-2ed00c660d27805fad59ce59757f8f29"><b>axis=2（跨列求和，书变窄）：</b></div><hr class="notion-hr notion-block-2ed00c660d2780899db0c84d5f0e36bc"/><blockquote class="notion-quote notion-block-2ed00c660d2780ebb947f02c6746d30e"><div><b>一句话记忆法：</b></div></blockquote><ul class="notion-list notion-list-disc notion-block-2ed00c660d27808ab9d2e7b6f0b80efa"><li><b>axis=0</b>：跨<b>第一层</b>（行/页）压缩，&quot;垂直&quot;方向</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d278017a1bcc79c835ed24e"><li><b>axis=1</b>：跨<b>第二层</b>（列/行）压缩，&quot;水平&quot;方向</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780a3abf3d0d09eb389bf"><li><b>axis=2</b>：跨<b>第三层</b>（深度/列）压缩，&quot;深入&quot;方向</li></ul><blockquote class="notion-quote notion-block-2ed00c660d27803cbf52c1bf79753474"><div><b>物理意义：</b></div></blockquote><div class="notion-text notion-block-2ed00c660d2780fe9055c0dc43dfffd6">想象一本书：</div><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780508a1fe2e7dbd840a7"><li>axis=0：把书页摞起来合并（厚→薄）</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780a78ecbcfd7fb3e7366"><li>axis=1：把每页的行合并（高→矮）</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d27802fa8f2ec3014681f77"><li>axis=2：把每页的列合并（宽→窄）</li></ul><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2ed00c660d2780d788f4fc880de65c66" data-id="2ed00c660d2780d788f4fc880de65c66"><span><div id="2ed00c660d2780d788f4fc880de65c66" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780d788f4fc880de65c66" title="2、多个维度同时求和"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-red"><span class="notion-yellow_background"><b>2、多个维度同时求和</b></span></span></span></span></h4><blockquote class="notion-quote notion-block-2f600c660d2780aab10ad040b6753227"><div>小技巧：怎么看张量维度的大小？</div><div class="notion-text notion-block-2f600c660d2780588becf21b9a146b24">看逗号旁边的[]有几层</div></blockquote><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2ed00c660d2780ca96a6da89f0efb268" data-id="2ed00c660d2780ca96a6da89f0efb268"><span><div id="2ed00c660d2780ca96a6da89f0efb268" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780ca96a6da89f0efb268" title="线性神经网络"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-purple"><span class="notion-pink_background">线性神经网络</span></span></span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2ed00c660d278036811edc45b68abbba" data-id="2ed00c660d278036811edc45b68abbba"><span><div id="2ed00c660d278036811edc45b68abbba" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278036811edc45b68abbba" title="一、线性回归"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">一、线性回归</span></span></h3><div class="notion-text notion-block-2ed00c660d2780b4b670ee0e5999c773">网课地址： <span class="notion-red"><span class="notion-yellow_background"><b><a class="notion-link" href="https://www.bilibili.com/video/BV1PX4y1g7KC/" target="_blank" rel="noopener noreferrer">线性回归</a></b></span></span><span class="notion-red"><span class="notion-yellow_background"><b>（点击观看）</b></span></span></div><div class="notion-callout notion-gray_background_co notion-block-2ed00c660d278024a125c337aa906f62"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2ed00c660d278007ab49e6b1ae0dc629"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A0951f4cf-6398-458e-81dc-476ef3c02395%3Aimage.png?table=block&amp;id=2ed00c66-0d27-8007-ab49-e6b1ae0dc629&amp;t=2ed00c66-0d27-8007-ab49-e6b1ae0dc629" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2ed00c660d27801aa7b7cd9d8d1c1424"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A5f4fbc50-ae8f-4bc2-8820-3166245c06e0%3Aimage.png?table=block&amp;id=2ed00c66-0d27-801a-a7b7-cd9d8d1c1424&amp;t=2ed00c66-0d27-801a-a7b7-cd9d8d1c1424" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2ed00c660d2780a6bc0cd88dcf93ddbe"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A03f25791-637c-43c8-b0c0-99fa5ef5bf18%3Aimage.png?table=block&amp;id=2ed00c66-0d27-80a6-bc0c-d88dcf93ddbe&amp;t=2ed00c66-0d27-80a6-bc0c-d88dcf93ddbe" alt="notion image" loading="lazy" decoding="async"/></div></figure></div></div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2ed00c660d27802593b9f067d90d4037" data-id="2ed00c660d27802593b9f067d90d4037"><span><div id="2ed00c660d27802593b9f067d90d4037" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d27802593b9f067d90d4037" title="二、基础优化算法：梯度下降"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>二、基础优化算法：梯度下降</b></span></span></h3><div class="notion-text notion-block-2ed00c660d2780e49a23c09e55eedb5a">网课：<span class="notion-red"><span class="notion-yellow_background"><b><a class="notion-link" href="https://www.bilibili.com/video/BV19f421Q7CL/" target="_blank" rel="noopener noreferrer">梯度下降算法，也有解释过拟合、学习率和损失，不错的网课</a></b></span></span><span class="notion-red"><span class="notion-yellow_background"><b>（点击观看）</b></span></span></div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2ed00c660d2780ea9616f573bc05192e" data-id="2ed00c660d2780ea9616f573bc05192e"><span><div id="2ed00c660d2780ea9616f573bc05192e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780ea9616f573bc05192e" title="三、前向传播、反向传播"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>三、前向传播、反向传播</b></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2ed00c660d2780e6a052cae7e73dbdf6" data-id="2ed00c660d2780e6a052cae7e73dbdf6"><span><div id="2ed00c660d2780e6a052cae7e73dbdf6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780e6a052cae7e73dbdf6" title="根据例子去理解"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-red"><span class="notion-yellow_background">根据例子去理解</span></span></span></span></h4><div class="notion-text notion-block-2ed00c660d27804d901ff80ad8aefce7"><b>1.全量梯度下降</b></div><div class="notion-text notion-block-2ed00c660d2780798511fd955d537812">假设我们有一个简单函数:  <span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span></div><div class="notion-text notion-block-2ed00c660d2780fd8286dc3ffc26dc27"><b>🔹 分析：</b><div class="notion-text-children"><ol start="1" class="notion-list notion-list-numbered notion-block-2ed00c660d2780c2b67ee08a3e514587" style="list-style-type:decimal"><li><b>前向传播</b>：计算 <code class="notion-inline-code">y</code> 的值。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2ed00c660d2780f98af4e2d21a5e3d2d" style="list-style-type:decimal"><li><b>计算图</b>：PyTorch 内部会记录 <code class="notion-inline-code">2*x</code>、<code class="notion-inline-code">+1</code> 这些操作。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2ed00c660d2780e4aedbfc9ae32016c2" style="list-style-type:decimal"><li><b>反向传播</b>：调用 <code class="notion-inline-code">y.backward()</code>，PyTorch 会自动利用链式法则求出 <code class="notion-inline-code">dy/dx</code>。</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-2ed00c660d278081aca4f908f5d4b695" style="list-style-type:decimal"><li><b>更新参数</b></li></ol></div></div><div class="notion-text notion-block-2ed00c660d2780e0b87fe9c60ba1b8f9"><b>2.小批量随机梯度下降（深度学习最广泛的优化算法）</b></div><div class="notion-text notion-block-2ed00c660d2780b4b559ed7fc885e9f1"><b>3.小批量随机梯度下降的pytorch规范实现</b></div><details class="notion-toggle notion-block-2ed00c660d2780d59955c17ddea2153e"><summary><span class="notion-red"><span class="notion-yellow_background"><b>上面代码解释（点击展开）</b></span></span></summary><div><h2 class="notion-h notion-h1 notion-block-2ed00c660d2780b992a0d313fb75f7b6" data-id="2ed00c660d2780b992a0d313fb75f7b6"><span><div id="2ed00c660d2780b992a0d313fb75f7b6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780b992a0d313fb75f7b6" title="1️⃣ 准备数据"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1️⃣ 准备数据</span></span></h2><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780d78c00d93258160866"><li><code class="notion-inline-code">true_w</code> 和 <code class="notion-inline-code">true_b</code>：真实线性回归的参数，</li><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780d78c00d93258160866"><div class="notion-text notion-block-2ed00c660d2780f99d01e2fa5dab4df6">我们希望神经网络学出来的 <code class="notion-inline-code">w</code> 和 <code class="notion-inline-code">b</code> 接近它们。</div></ul></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d27808f9f6ad872071217a6"><li><code class="notion-inline-code">d2l.synthetic_data</code>：生成 <b>模拟数据</b>，公式是： <span class="notion-yellow_background"><span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span></span></li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780b7bf4ee0d50652672a"><li><code class="notion-inline-code">features</code> 是 1000 个样本，每个样本 2 个特征 → 形状 <code class="notion-inline-code">(1000, 2)</code></li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d278083ad17ee1a180b7a04"><li><code class="notion-inline-code">labels</code> 是对应的目标值 → 形状 <code class="notion-inline-code">(1000, 1)</code></li></ul><div class="notion-text notion-block-2ed00c660d2780cdba42fd7cfee4f442">💡 直觉：你在造一堆数据，用来训练模型。</div><hr class="notion-hr notion-block-2ed00c660d2780c99b25faec774f4ac8"/><h2 class="notion-h notion-h1 notion-block-2ed00c660d2780958083f529a73b3176" data-id="2ed00c660d2780958083f529a73b3176"><span><div id="2ed00c660d2780958083f529a73b3176" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780958083f529a73b3176" title="2️⃣ 构建数据迭代器（小批量 SGD）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2️⃣ 构建数据迭代器（小批量 SGD）</span></span></h2><ul class="notion-list notion-list-disc notion-block-2ed00c660d27805ca9b5dc8643cad29e"><li><code class="notion-inline-code">TensorDataset(*data_arrays)</code>：把 features 和 labels 配对，保证 x 对应 y</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d27800f9e2efac3a360c20b"><li><code class="notion-inline-code">DataLoader</code>：生成 <b>可迭代对象（一个batch的数据）</b>，每次返回一个 batch</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d278041a97bce20d9cbb1e8"><li><code class="notion-inline-code">shuffle=is_train</code>：训练时打乱数据顺序</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d278077ad36d0e53503b397"><li><code class="notion-inline-code">batch_size = 10</code> → 每次拿 10 个样本训练</li></ul><div class="notion-text notion-block-2ed00c660d2780959233dd15debffaef">💡 直觉：</div><blockquote class="notion-quote notion-block-2ed00c660d27806a9157ca27394ea02b"><div>就像把 1000 个样本切成 100 个小包，每次取一个小包去梯度下降。</div></blockquote><hr class="notion-hr notion-block-2ed00c660d27806190cedacf66dbd836"/><h2 class="notion-h notion-h1 notion-block-2ed00c660d278006b484e73a7166ab7b" data-id="2ed00c660d278006b484e73a7166ab7b"><span><div id="2ed00c660d278006b484e73a7166ab7b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d278006b484e73a7166ab7b" title="3️⃣ 构建神经网络"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3️⃣ 构建神经网络</span></span></h2><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780969987c25744004714"><li><code class="notion-inline-code">nn.Linear(2, 1)</code>：线性层，2 个输入特征 → 1 个输出</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780b8b3f1ec8fb24290ee"><li><code class="notion-inline-code">nn.Sequential</code>：把网络组织成顺序结构（这里只有一层）</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d278026acb6c470c90bc509"><li>初始化参数：</li></ul><div class="notion-text notion-block-2ed00c660d2780d390cce932507a01c5">💡 直觉：</div><blockquote class="notion-quote notion-block-2ed00c660d278051aff4da1510df4e60"><div>这就是线性回归模型 y = w1x1 + w2x2 + b，只是用 PyTorch 的神经网络模块表示。</div></blockquote><hr class="notion-hr notion-block-2ed00c660d278035b701f420a8c12877"/><h2 class="notion-h notion-h1 notion-block-2ed00c660d2780ea9cc9dda4a1b67d3a" data-id="2ed00c660d2780ea9cc9dda4a1b67d3a"><span><div id="2ed00c660d2780ea9cc9dda4a1b67d3a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780ea9cc9dda4a1b67d3a" title="4️⃣ 定义损失函数和优化器"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">4️⃣ 定义损失函数和优化器</span></span></h2><ul class="notion-list notion-list-disc notion-block-2ed00c660d27803c9bdbe163c1abfd49"><li><code class="notion-inline-code">loss</code>：均方误差</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d278084b4f8f4d56688913b"><li><code class="notion-inline-code">trainer</code>：随机梯度下降优化器（学习率 0.03）</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d27801d8408f03ebfee3e0c"><li><code class="notion-inline-code">net.parameters()</code> 会自动获取网络中可学习的参数（w 和 b）</li></ul><div class="notion-text notion-block-2ed00c660d27802ab593d1b73ef0cfa9">💡 直觉：</div><blockquote class="notion-quote notion-block-2ed00c660d27808dbdf8dbedc1947a52"><div>告诉网络：你要学的目标是“预测值尽量接近真实标签”，怎么更新参数我帮你算。</div></blockquote><hr class="notion-hr notion-block-2ed00c660d27806d9d8ecf92fbfdef9c"/><h2 class="notion-h notion-h1 notion-block-2ed00c660d2780128d42fc4163c56665" data-id="2ed00c660d2780128d42fc4163c56665"><span><div id="2ed00c660d2780128d42fc4163c56665" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780128d42fc4163c56665" title="5️⃣ 训练循环"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">5️⃣ 训练循环</span></span></h2><div class="notion-text notion-block-2ed00c660d2780769adefca16e6f4231">逐步解释：</div><ol start="1" class="notion-list notion-list-numbered notion-block-2ed00c660d2780b08ff6e707fffba947" style="list-style-type:decimal"><li><b>for X, y in data_iter</b></li><ol class="notion-list notion-list-numbered notion-block-2ed00c660d2780b08ff6e707fffba947" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2ed00c660d27805c9c84d4d8dda0c0f2"><li>取一个 batch 的样本 (X) 和标签 (y)</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d278045a02bc4ead655955a"><li>batch_size = 10，每轮迭代处理 10 个样本</li></ul></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2ed00c660d27801ca855f276dc5a18f6" style="list-style-type:decimal"><li><b>l = loss(net(X), y)</b></li><ol class="notion-list notion-list-numbered notion-block-2ed00c660d27801ca855f276dc5a18f6" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780388b9fccd8f96abf2c"><li>前向传播：预测 y_hat = net(X)， y_hat 就是预测值</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d278075973ada24452c9355"><li>计算损失 = MSE(y_hat, y)</li></ul></ol></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2ed00c660d2780ef8571faf08358c8c5" style="list-style-type:decimal"><li><b>trainer.zero_grad()</b></li><ol class="notion-list notion-list-numbered notion-block-2ed00c660d2780ef8571faf08358c8c5" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780feaf66f856c14d54a7"><li>清零上一次梯度</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780129d82fce2235f012c"><li>PyTorch 默认梯度是累加的，所以每次必须清零</li></ul></ol></ol><ol start="4" class="notion-list notion-list-numbered notion-block-2ed00c660d2780d29b77e5b457bc077b" style="list-style-type:decimal"><li><b>l.backward()</b></li><ol class="notion-list notion-list-numbered notion-block-2ed00c660d2780d29b77e5b457bc077b" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2ed00c660d27802d9e6ed916b7440b79"><li>反向传播，计算梯度 w.grad, b.grad</li></ul></ol></ol><ol start="5" class="notion-list notion-list-numbered notion-block-2ed00c660d27804aa0ebf8c90b361642" style="list-style-type:decimal"><li><b>trainer.step()</b></li><ol class="notion-list notion-list-numbered notion-block-2ed00c660d27804aa0ebf8c90b361642" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2ed00c660d278099aa8ac933015a0eee"><li>用 SGD 更新 w 和 b</li></ul></ol></ol><ol start="6" class="notion-list notion-list-numbered notion-block-2ed00c660d278003970be444bd83c6f7" style="list-style-type:decimal"><li><b>l = loss(net(features), labels)</b></li><ol class="notion-list notion-list-numbered notion-block-2ed00c660d278003970be444bd83c6f7" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2ed00c660d278076844ec46450244b50"><li>每个 epoch 结束，用全量数据计算 loss 打印</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780e183f6e59ec63a42b1"><li>便于观察训练进度</li></ul></ol></ol><hr class="notion-hr notion-block-2ed00c660d27806eaa2cc6b50a18e0c1"/><h2 class="notion-h notion-h1 notion-block-2ed00c660d2780499da1ed6ac166de49" data-id="2ed00c660d2780499da1ed6ac166de49"><span><div id="2ed00c660d2780499da1ed6ac166de49" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780499da1ed6ac166de49" title="6️⃣ 打印参数误差"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">6️⃣ 打印参数误差</span></span></h2><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780bb939df09fb0ff40e8"><li><code class="notion-inline-code">net[0].weight.data</code> → 学到的 w</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780089994e8adbf76136f"><li><code class="notion-inline-code">reshape(true_w.shape)</code> → 调整形状方便对比</li></ul><ul class="notion-list notion-list-disc notion-block-2ed00c660d2780b5b472d8c3343dd5d7"><li>打印误差：越小说明训练越接近真实参数</li></ul><div class="notion-text notion-block-2ed00c660d27803bb04deedec38ba9eb">💡 直觉：</div><blockquote class="notion-quote notion-block-2ed00c660d2780eaa484ff674ab6919d"><div>训练完成后，你可以直接看到“网络学到了多少真实规律”。</div></blockquote><hr class="notion-hr notion-block-2ed00c660d27808fb8aae6e12d202d0b"/><h2 class="notion-h notion-h1 notion-block-2ed00c660d2780fe86d4d45880f84a58" data-id="2ed00c660d2780fe86d4d45880f84a58"><span><div id="2ed00c660d2780fe86d4d45880f84a58" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ed00c660d2780fe86d4d45880f84a58" title="7️⃣ 总结一句话"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">7️⃣ 总结一句话</span></span></h2><div class="notion-text notion-block-2ed00c660d27802c8414d40e441fe500">这段代码就是 <b>“用 PyTorch 写的小批量线性回归”</b>：</div><ol start="1" class="notion-list notion-list-numbered notion-block-2ed00c660d27803ba982c548d5c1e54e" style="list-style-type:decimal"><li>造一堆数据</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2ed00c660d2780d4bacaf0dde2041489" style="list-style-type:decimal"><li>用 <code class="notion-inline-code">DataLoader</code> 切成小批量</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2ed00c660d2780caa320d643db0c8d8d" style="list-style-type:decimal"><li>定义网络（线性层）</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-2ed00c660d2780418475d38e40e388de" style="list-style-type:decimal"><li>定义损失函数和优化器</li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-2ed00c660d2780559ab4f20be3423453" style="list-style-type:decimal"><li>循环训练：</li><ol class="notion-list notion-list-numbered notion-block-2ed00c660d2780559ab4f20be3423453" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2ed00c660d27805d9891caa31951355d"><li>前向传播 → 反向传播 → 梯度下降</li></ul></ol></ol><ol start="6" class="notion-list notion-list-numbered notion-block-2ed00c660d278044a90dce10e0c53e0c" style="list-style-type:decimal"><li>输出训练进度和学到的参数</li></ol><blockquote class="notion-quote notion-block-2ed00c660d2780e596baf923e9f177cc"><div>核心其实就是：</div><div class="notion-text notion-block-2ed00c660d278033af0dc20357b0b5a6"><b>线性回归 = 单层神经网络 + MSE + SGD</b></div></blockquote></div></details><div class="notion-text notion-block-2ed00c660d278047aea9f84ccff32d63"><b>模型训练完可以这么用：</b></div><div class="notion-text notion-block-2ed00c660d2780f6a10df4eb3dd1379a">它已经基本学会了 <span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span></div><div class="notion-text notion-block-2ed00c660d2780fc8c4be0be985b61a5">代码有些torch的函数，之后会说到，现在只需要知道大致的训练过程</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2ee00c660d27807790b4feb93f9d9ce8" data-id="2ee00c660d27807790b4feb93f9d9ce8"><span><div id="2ee00c660d27807790b4feb93f9d9ce8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ee00c660d27807790b4feb93f9d9ce8" title="四、torch 常用操作"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">四、torch 常用操作</span></span></h3><div class="notion-text notion-block-2ee00c660d278047a271d81b9dc65cab">网课（点击观看）： <span class="notion-red"><span class="notion-yellow_background"><a class="notion-link" href="https://www.bilibili.com/video/BV1rC4y1v7sN" target="_blank" rel="noopener noreferrer">pytorch的常见使用-陶卓老师</a></span></span></div><div class="notion-callout notion-gray_background_co notion-block-2ee00c660d27807a825ce7408b5e70cf"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2ee00c660d2780f4b868cc54f5448c8c"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Af5b9e3e7-64b6-45ee-8ec9-faebbd113d23%3Aimage.png?table=block&amp;id=2ee00c66-0d27-80f4-b868-cc54f5448c8c&amp;t=2ee00c66-0d27-80f4-b868-cc54f5448c8c" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2ee00c660d278044b62cdc5305ebcf08">注意x.view是一个重塑形状的函数，-1 表示这个位置让 pytorch 自己计算，其余位置的数量，比如上面例子里面的 32 * 12 * 12 就是自己指定的列，因为<span class="notion-yellow_background">原来的形状是 32, 12 * 12</span>，现在需要当作线性全连接层的输入，要求展平成一列，所以<span class="notion-yellow_background">通过 view 成 1, (32 * 12 * 12)</span></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2ee00c660d2780d093edec29108acac0"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A6485ac35-c0ae-4381-a772-e5c30ae93c26%3Aimage.png?table=block&amp;id=2ee00c66-0d27-80d0-93ed-ec29108acac0&amp;t=2ee00c66-0d27-80d0-93ed-ec29108acac0" alt="notion image" loading="lazy" decoding="async"/></div></figure></div></div><div class="notion-text notion-block-2ee00c660d278041b1a4cff24328e415">根据上面的基础结构，可以写出基础训练代码：</div><div class="notion-text notion-block-2ee00c660d278009964df7a8a617e789">如果需要保存模型，并测试性能，可以这么写，也就是一个完整的入门级训练流程：</div><details class="notion-toggle notion-block-2ee00c660d27805a9a70f298fb31e334"><summary><span class="notion-red"><span class="notion-yellow_background"><b>这段代码的循环损失计算逻辑，涉及到 epoch 和 batch 的关系，所以重点讲一下</b></span></span></summary><div><h3 class="notion-h notion-h2 notion-block-2ee00c660d2780e08ab1e0ba2c162223" data-id="2ee00c660d2780e08ab1e0ba2c162223"><span><div id="2ee00c660d2780e08ab1e0ba2c162223" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ee00c660d2780e08ab1e0ba2c162223" title="1️⃣ running_loss += loss.item()"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1️⃣ <code class="notion-inline-code">running_loss += loss.item()</code></span></span></h3><ul class="notion-list notion-list-disc notion-block-2ee00c660d2780688adec7385b5cfe4e"><li><code class="notion-inline-code">loss</code> 是一个 <span class="notion-purple_background"><b>PyTorch 张量</b></span><span class="notion-purple_background">（tensor）</span>，表示当前 batch 的平均损失，比如 <code class="notion-inline-code">[1.2345]</code></li></ul><ul class="notion-list notion-list-disc notion-block-2ee00c660d27805e8ac2ee93a332d0cb"><li><code class="notion-inline-code">loss.item()</code> 会把这个张量转换成 <span class="notion-purple_background"><b>Python 浮点数</b></span>，方便做加法或打印</li></ul><ul class="notion-list notion-list-disc notion-block-2ee00c660d2780bd817cfc3b522d8c5d"><li><code class="notion-inline-code">running_loss</code> 是我们自己定义的变量，用来 <b>累加当前 epoch 所有 batch 的 loss</b></li></ul><div class="notion-text notion-block-2ee00c660d27802bb356dc03e78b06fd"><b>例如：</b></div><ul class="notion-list notion-list-disc notion-block-2ee00c660d2780c69fa9ea6825ea5a90"><li>循环完后，<code class="notion-inline-code">running_loss = 1.2 + 0.8 + ...</code>，就是 epoch 中所有 batch 的总 loss</li></ul><hr class="notion-hr notion-block-2ee00c660d27803f9c5fe88396a599a4"/><h3 class="notion-h notion-h2 notion-block-2ee00c660d278063af4fe1d7e4ec4a0e" data-id="2ee00c660d278063af4fe1d7e4ec4a0e"><span><div id="2ee00c660d278063af4fe1d7e4ec4a0e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ee00c660d278063af4fe1d7e4ec4a0e" title="2️⃣ f&#x27;Loss: {running_loss/len(train_loader):.4f}&#x27;"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2️⃣ <code class="notion-inline-code">f&#x27;Loss: {running_loss/len(train_loader):.4f}&#x27;</code></span></span></h3><ul class="notion-list notion-list-disc notion-block-2ee00c660d2780959b3af0847a668397"><li>这里做了两个事情：</li><ul class="notion-list notion-list-disc notion-block-2ee00c660d2780959b3af0847a668397"><ol start="1" class="notion-list notion-list-numbered notion-block-2ee00c660d27802a986fcface034272c" style="list-style-type:decimal"><li><code class="notion-inline-code"><b>running_loss / len(train_loader)</b></code></li><ol class="notion-list notion-list-numbered notion-block-2ee00c660d27802a986fcface034272c" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2ee00c660d27804aac72ce515e2c1d0c"><li><code class="notion-inline-code">len(train_loader)</code> 是训练集里 <span class="notion-purple_background"><b>batch 的总数 ！！！！！</b></span></li></ul><ul class="notion-list notion-list-disc notion-block-2ee00c660d278062aaf5c6412bfb3180"><li>除以 batch 数就得到 <span class="notion-purple_background"><b>平均每个 batch 的 loss</b></span></li></ul><ul class="notion-list notion-list-disc notion-block-2ee00c660d278047b208c7f591619246"><li>这样打印的 loss 就不会随 batch 数量大小而变化，更容易比较</li></ul></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2ee00c660d278090bb5aecd3d84199b1" style="list-style-type:decimal"><li><code class="notion-inline-code"><b>:.4f</b></code></li><ol class="notion-list notion-list-numbered notion-block-2ee00c660d278090bb5aecd3d84199b1" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2ee00c660d2780458ce8d1cef7a2d757"><li>格式化输出，保留 4 位小数</li></ul><ul class="notion-list notion-list-disc notion-block-2ee00c660d27800faa2ace62f37632e8"><li>例如 <code class="notion-inline-code">1.234567</code> → <code class="notion-inline-code">1.2346</code></li></ul></ol></ol></ul></ul><div class="notion-text notion-block-2ee00c660d27803c8ed1fc466452ba15">💡 换句话说，这一行就是：</div><blockquote class="notion-quote notion-block-2ee00c660d2780d2837acc0edf38c9a6"><div>“打印这个 epoch 的平均训练损失”</div></blockquote><hr class="notion-hr notion-block-2ee00c660d2780e2acbbc10b1c764f9a"/><h4 class="notion-h notion-h3 notion-block-2ee00c660d2780d8afc0c60b1c78d362" data-id="2ee00c660d2780d8afc0c60b1c78d362"><span><div id="2ee00c660d2780d8afc0c60b1c78d362" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ee00c660d2780d8afc0c60b1c78d362" title="3️⃣ 举个简单例子"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3️⃣ 举个简单例子</span></span></h4><div class="notion-text notion-block-2ee00c660d2780288421f1de62c29025">假设一个 epoch 有 3 个 batch：</div><table class="notion-simple-table notion-block-2ee00c660d2780bbbb5de1cc337be135"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-2ee00c660d2780f29e12da9b2bf26e3f"><td class="" style="width:120px"><div class="notion-simple-table-cell">batch</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">loss.item()</div></td></tr><tr class="notion-simple-table-row notion-block-2ee00c660d2780cd8287ecd457676696"><td class="" style="width:120px"><div class="notion-simple-table-cell">1</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">1.2</div></td></tr><tr class="notion-simple-table-row notion-block-2ee00c660d278050b57ed722e780a581"><td class="" style="width:120px"><div class="notion-simple-table-cell">2</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">0.8</div></td></tr><tr class="notion-simple-table-row notion-block-2ee00c660d2780398494d3159421a327"><td class="" style="width:120px"><div class="notion-simple-table-cell">3</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">1.0</div></td></tr></tbody></table><div class="notion-text notion-block-2ee00c660d27801ea6fced4da3255c79">这样就可以 <b>直观地看出整个 epoch 的训练情况</b>。</div><hr class="notion-hr notion-block-2ee00c660d2780de915bd6953f7a5f21"/><div class="notion-text notion-block-2ee00c660d278090a936e18dbabaa268">简单一句话总结：</div><ul class="notion-list notion-list-disc notion-block-2ee00c660d278027844fc7a7dda28377"><li><code class="notion-inline-code">running_loss += loss.item()</code> → <b>累加每个 batch 的损失</b></li></ul><ul class="notion-list notion-list-disc notion-block-2ee00c660d2780deb0f5d03c22436473"><li><code class="notion-inline-code">running_loss / len(train_loader)</code> → <b>计算整个 epoch 的平均 loss，用来打印或监控训练</b></li></ul></div></details><details class="notion-toggle notion-block-2ee00c660d27801ea4d9e464d9a9c1e0"><summary><span class="notion-red"><span class="notion-yellow_background"><b>另外，关于准确率的计算，也很容易让人迷惑</b></span></span></summary><div><h3 class="notion-h notion-h2 notion-block-2ee00c660d278035b814f19a86ad2996" data-id="2ee00c660d278035b814f19a86ad2996"><span><div id="2ee00c660d278035b814f19a86ad2996" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ee00c660d278035b814f19a86ad2996" title="1️⃣ 预测类别"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1️⃣ 预测类别</span></span></h3><ul class="notion-list notion-list-disc notion-block-2ee00c660d27808fa9b8c7b5ba437180"><li><code class="notion-inline-code">y_pred</code> 是模型输出，形状 <code class="notion-inline-code">[batch_size, 7]</code>（7 表示 7 类情绪的 logits）</li></ul><ul class="notion-list notion-list-disc notion-block-2ee00c660d2780dbb4a3dc0cb9470707"><li><code class="notion-inline-code">torch.max(y_pred, 1)</code> 会在 <b>第 1 维（类别维度）</b> 找出每行最大的值</li><ul class="notion-list notion-list-disc notion-block-2ee00c660d2780dbb4a3dc0cb9470707"><li>返回<b>两个值</b>：</li><ul class="notion-list notion-list-disc notion-block-2ee00c660d27804da456fed959cc0815"><ol start="1" class="notion-list notion-list-numbered notion-block-2ee00c660d2780bab8f6d2e877b40468" style="list-style-type:decimal"><li><b>最大值本身</b>（这里我们用 <code class="notion-inline-code">_</code> 忽略）</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2ee00c660d2780a7bf59d4cead04b8c7" style="list-style-type:decimal"><li><b>最大值对应的索引</b> → 这就是预测的类别</li></ol></ul></ul></ul><ul class="notion-list notion-list-disc notion-block-2ee00c660d2780699ebaf9d658a28494"><li>举例：</li></ul><ul class="notion-list notion-list-disc notion-block-2ee00c660d2780c18130e35c0a21aa49"><li>这里 <code class="notion-inline-code">[2, 0]</code> 就是每个样本模型预测的类别索引</li></ul><hr class="notion-hr notion-block-2ee00c660d27800a973ee69830c50869"/><h3 class="notion-h notion-h2 notion-block-2ee00c660d278033928cf9c26f5240a5" data-id="2ee00c660d278033928cf9c26f5240a5"><span><div id="2ee00c660d278033928cf9c26f5240a5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ee00c660d278033928cf9c26f5240a5" title="2️⃣ 统计总样本数"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2️⃣ 统计总样本数</span></span></h3><ul class="notion-list notion-list-disc notion-block-2ee00c660d27802686d6dbd7214a1447"><li><code class="notion-inline-code">labels</code> 是真实标签，形状 <code class="notion-inline-code">[batch_size]</code></li></ul><ul class="notion-list notion-list-disc notion-block-2ee00c660d27802fadefc6b9e58f6865"><li><code class="notion-inline-code">labels.size(0)</code> 就是 <span class="notion-purple_background"><b>这个 batch 的样本数</b></span></li></ul><ul class="notion-list notion-list-disc notion-block-2ee00c660d27805bbb6cc120e4f02994"><li><code class="notion-inline-code">total</code> 是我们定义的一个变量，用来<span class="notion-purple_background"><b>累加得到整个 epoch 的样本数</b></span></li></ul><ul class="notion-list notion-list-disc notion-block-2ee00c660d27806eb164d150054f340c"><li>这样最后可以计算 整个 epoch 的准确率</li></ul><hr class="notion-hr notion-block-2ee00c660d27801280e3fcbc8d93a4d0"/><h3 class="notion-h notion-h2 notion-block-2ee00c660d278023910cf90832ce25bd" data-id="2ee00c660d278023910cf90832ce25bd"><span><div id="2ee00c660d278023910cf90832ce25bd" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ee00c660d278023910cf90832ce25bd" title="3️⃣ 统计正确预测的数量"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3️⃣ 统计正确预测的数量</span></span></h3><ul class="notion-list notion-list-disc notion-block-2ee00c660d278019add0f805d80efffa"><li><code class="notion-inline-code">(predicted == labels)</code> → 逐元素比较</li><ul class="notion-list notion-list-disc notion-block-2ee00c660d278019add0f805d80efffa"><li>返回一个 <b>布尔 tensor</b>，True 表示预测正确</li></ul></ul><ul class="notion-list notion-list-disc notion-block-2ee00c660d2780909053e4a0919159b8"><li><code class="notion-inline-code">.sum()</code> → 把 True 的数量加起来（<span class="notion-purple_background"><b>PyTorch 会自动把 True 当成 1</b></span>）</li></ul><ul class="notion-list notion-list-disc notion-block-2ee00c660d2780c89798c856b605158a"><li><code class="notion-inline-code">.item()</code> → 把 tensor 转成 Python 数字</li></ul><ul class="notion-list notion-list-disc notion-block-2ee00c660d278049bc8deddd7df006c0"><li><code class="notion-inline-code">correct</code> → 累加<span class="notion-purple_background"><b>整个 epoch 或整个测试集正确预测的样本数</b></span></li></ul><hr class="notion-hr notion-block-2ee00c660d27803586ddd88e9191e195"/><h3 class="notion-h notion-h2 notion-block-2ee00c660d278074ac9ace431c4880b8" data-id="2ee00c660d278074ac9ace431c4880b8"><span><div id="2ee00c660d278074ac9ace431c4880b8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ee00c660d278074ac9ace431c4880b8" title="4️⃣ 计算准确率"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">4️⃣ 计算准确率</span></span></h3><div class="notion-text notion-block-2ee00c660d27809aab6cd098f759d565">假设在整个 epoch 中：</div><div class="notion-text notion-block-2ee00c660d2780ae9b0fdcdc472c86a1">那么准确率：</div><ul class="notion-list notion-list-disc notion-block-2ee00c660d2780489c2eca70ad9513b4"><li>表示模型预测正确的比例：85%</li></ul><hr class="notion-hr notion-block-2ee00c660d278087a0d6c489e17a738e"/><h4 class="notion-h notion-h3 notion-block-2ee00c660d278014975dc81f537db2fe" data-id="2ee00c660d278014975dc81f537db2fe"><span><div id="2ee00c660d278014975dc81f537db2fe" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ee00c660d278014975dc81f537db2fe" title="5️⃣ 演示一遍完整流程"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">5️⃣ 演示一遍完整流程</span></span></h4><div class="notion-text notion-block-2ee00c660d2780fcb545fed5c405cc0e">假设 batch_size = 3：</div><ul class="notion-list notion-list-disc notion-block-2ee00c660d2780b8aeecec286713a841"><li>这样就统计了这个 batch 的准确率</li></ul><ul class="notion-list notion-list-disc notion-block-2ee00c660d27805192caf3d3db64245e"><li>如果在循环里累加 <code class="notion-inline-code">correct</code> 和 <code class="notion-inline-code">total</code>，就可以得到整个 epoch 或整个测试集的准确率</li></ul><hr class="notion-hr notion-block-2ee00c660d2780ccb06ccd543009bd0c"/><div class="notion-text notion-block-2ee00c660d2780d9a708cb4a952f2feb">💡 <b>总结</b>：</div><ul class="notion-list notion-list-disc notion-block-2ee00c660d27802f86bcd65a1cbeb226"><li><code class="notion-inline-code">torch.max(...,1)</code> → 模型预测的类别</li></ul><ul class="notion-list notion-list-disc notion-block-2ee00c660d2780bdac36f0cf6a484e17"><li><code class="notion-inline-code">predicted == labels</code> → 哪些预测正确</li></ul><ul class="notion-list notion-list-disc notion-block-2ee00c660d2780a2bceafca60a18028a"><li><code class="notion-inline-code">.sum()</code> → 统计正确数量</li></ul><ul class="notion-list notion-list-disc notion-block-2ee00c660d27807cbaafc74aa2b5eeab"><li><code class="notion-inline-code">accuracy = correct / total</code> → 得到准确率</li></ul><hr class="notion-hr notion-block-2ee00c660d2780acab7af66da6de7681"/></div></details><div class="notion-text notion-block-2ee00c660d278073a316c5a17a833259"><b>训练结果，还算ok，但对于实际的现实应用还远远不够，还有点过拟合：</b></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2ee00c660d27803b81a5d5b36a8ff0c4" data-id="2ee00c660d27803b81a5d5b36a8ff0c4"><span><div id="2ee00c660d27803b81a5d5b36a8ff0c4" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ee00c660d27803b81a5d5b36a8ff0c4" title="多层感知机"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-purple"><span class="notion-pink_background">多层感知机</span></span></span></span></h2><div class="notion-text notion-block-2ee00c660d27809fa0dcfd2e41892ca4"><span class="notion-purple"><span class="notion-pink_background">深度学习的“Hello world”</span></span></div><div class="notion-text notion-block-2ee00c660d2780228f68cd1171074990">网课（点击观看）： <span class="notion-red"><span class="notion-yellow_background"><b><a class="notion-link" href="https://www.bilibili.com/video/BV1Ds4y1M7MM/" target="_blank" rel="noopener noreferrer">说人话系列：多层感知机</a></b></span></span></div><div class="notion-text notion-block-2f600c660d2780ebb80aceba9b60f62b"><span class="notion-teal_background"><b>只看感知机、多层感知机、参数更新的演示，其它不看</b></span></div><div class="notion-callout notion-gray_background_co notion-block-2ee00c660d2780188b3fc477bae9f759"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2ee00c660d2780ee9dc0f2a710e8176f"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A45923794-e0bf-41a3-ad75-bfb56ec2bd5f%3Aimage.png?table=block&amp;id=2ee00c66-0d27-80ee-9dc0-f2a710e8176f&amp;t=2ee00c66-0d27-80ee-9dc0-f2a710e8176f" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2ee00c660d27803eaf80dc77ddc93f91"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Aa9244a2e-1d9e-4ca3-9b91-20543574dc37%3Aimage.png?table=block&amp;id=2ee00c66-0d27-803e-af80-dc77ddc93f91&amp;t=2ee00c66-0d27-803e-af80-dc77ddc93f91" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2ee00c660d2780a6addcc9fad608a73a"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A8e65b12c-fa4b-4206-a0f6-b7dcc516bc21%3Aimage.png?table=block&amp;id=2ee00c66-0d27-80a6-addc-c9fad608a73a&amp;t=2ee00c66-0d27-80a6-addc-c9fad608a73a" alt="notion image" loading="lazy" decoding="async"/></div></figure></div></div><div class="notion-text notion-block-2ee00c660d27800e8714c940fde12789">这个网课，关于<span class="notion-red"><span class="notion-yellow_background"><b>感知机到多层感知机（神经网络）这个发展过程，以及参数更新</b></span></span>的部分讲的很清楚，其他部分很基础，如果已经懂了，可以跳过</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2ee00c660d278009be57d3fed2195c2d" data-id="2ee00c660d278009be57d3fed2195c2d"><span><div id="2ee00c660d278009be57d3fed2195c2d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ee00c660d278009be57d3fed2195c2d" title="结语"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-purple"><span class="notion-pink_background"><b>结语</b></span></span></span></span></h2><div class="notion-text notion-block-2ee00c660d278039a261fd4605b33198">恭喜看完，这个教程还是 demo 版本，我还在不断整理，可能会涉及<b>顺序调整或者内容增减</b>，但是如果你能够<b>学完深度学习的前两篇文章，并实打实自己敲了代码</b>，一定已经入门了深度学习，要对自己有信心！</div><div class="notion-text notion-block-2ee00c660d2780d983d2f99a112eb83a">接下来就是不断<b>通过实际的例题和比赛</b>，来<b>巩固</b>自己学到的东西，说直白一点，在自己的那部分深度学习研究领域，常用的代码，要形成“肌肉记忆”。</div><div class="notion-text notion-block-2ee00c660d2780439042f7f19a088d3f">后续我会更新我研究领域的有关文章，主要是<b>计算机视觉图像分割</b>方面的作业或实验，敬请期待。</div></main></div>]]></content:encoded>
        </item>
    </channel>
</rss>