<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by ywchen on Medium]]></title>
        <description><![CDATA[Stories by ywchen on Medium]]></description>
        <link>https://medium.com/@ywchen88?source=rss-8349b04edcb8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*RoazYL1utC6azFIDlQ9iJA.jpeg</url>
            <title>Stories by ywchen on Medium</title>
            <link>https://medium.com/@ywchen88?source=rss-8349b04edcb8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 02:44:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ywchen88/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[[記錄] 機器學習model部署到正式環境]]></title>
            <link>https://medium.com/@ywchen88/%E8%A8%98%E9%8C%84-%E6%A9%9F%E5%99%A8%E5%AD%B8%E7%BF%92model%E9%83%A8%E7%BD%B2%E5%88%B0%E6%AD%A3%E5%BC%8F%E7%92%B0%E5%A2%83-d61554dacf65?source=rss-8349b04edcb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/d61554dacf65</guid>
            <dc:creator><![CDATA[ywchen]]></dc:creator>
            <pubDate>Sat, 15 Feb 2020 11:00:17 GMT</pubDate>
            <atom:updated>2020-02-15T11:00:17.813Z</atom:updated>
            <content:encoded><![CDATA[<p>記錄一下回應別人文章的分享 (這邊已經變成倉庫了…)</p><p><a href="https://www.facebook.com/groups/datasci.tw/permalink/2758425824234790/">國欣邱</a></p><p>— —</p><p>藉這個機會讓小弟分享一下個人淺見，會有點雜亂，而且可能不一定回答到問題，不過還是希望能有幫助<br>如果你能分享你的 model 大概的演算法（例如是 linear regression? decision tree? SVM? Neural network?）<br>或許會讓其他人也更能了解回答</p><p>我覺得可以從四點來看</p><ol><li>推動背景</li><li>ML system design</li><li>產品策略/了解限制</li><li>現有幫助</li></ol><p>第3.點實務上要先考慮，但順序上先講 2. 可能比較順</p><p>1. 推動背景</p><p>A) 了解哪些有，哪些沒有，要「取代/新增」的部份是什麼？<br>例如，如果目的是「算出一個標籤打在用戶上」，是否公司線上已有簡單的邏輯？<br>這樣子要推動機器學習model時有些部門的技術就可以重用，只要注意現行技術 (e.g. serving) 和新技術之間的介接就好。</p><p>又例如您想要做「用戶行為會隨著時間改變，所以希望把這model自動化」，<br>所以還需要「拿到用戶行為 -&gt; 給某個邏輯」的銜接，甚至是「測量邏輯的好壞」（無論邏輯是既有的很簡單的還是還沒發明的model）<br>那麼這個介接是否已經存在，會決定你要的技術支援</p><p>B) 產品 KPI / Goal metrics 是什麼？這個可能和您的問題沒有太大關係，不過時常會影響後面 2., 3. 的評估決策</p><p>2. ML system design<br>一個機器學習的系統大概會包括幾個大項，依序變成一個 feedback loop<br>A) data pipeline (data collection / cleanup / feature extraction etc)<br>B) model training<br>C) model validation<br>D) inference (deployment, serving etc)<br>E) online measure (then data feedback to A)<br>此外還有每一步都會需要的基礎建設，例如 moniter, alert, logging …，可以搜尋 prometheus, grafana, ELK 之類的<br>以及把這些步驟串起來的 “workflow engine”，小至 cronjob，大的話可以搜尋 “airflow” 之類的</p><p>這邊在技術上要分別注意「每一步的技術」和「兩步之間的銜接」</p><p>例如在 B) 這一步用了 R 來做模型的話，可能就要想到時候 R 的模型要怎麼真的在產品上預測 (打用戶標簽)，也就是 D) 的部份<br>這時候就會需要 serving 相關部門一起討論<br>例如就會考慮到</p><ul><li>Serving 是 online 還是 offline? (一個用戶進來就要做一次，還是可以每天下午三點全體用戶慢慢標一次？)</li><li>因為上面，所以我做一次預測要多久？(一個要在 0.1 秒完成，還是一萬個要在 1000 秒裡面完成？latency vs. throughput)<br>由上面這兩點大概可以決定 serving pipeline 的 input &amp; output<br>例如要用 python Flask 包一層 web API 還是 crobjob 跑一個程式就好</li><li>這個用 R 的算法，有沒有在其他語言的函式庫也可以使用？例如如果是在 R 上面用 SVM 的話，SVM 本身只是一種演算法，在 python 上面也有實作的函式庫</li><li>如果是在 python 的話，可以搜尋 “python + 那個演算法”。此外比較一般性的話，可以看看 “scikit learn” 這個函式庫，或者如果是和 neural network / deep learning 有關的話可以看 Tensorflow</li><li>通常在用程式訓練開發時，在同個程式寫的 prediction/test/inference，和實際部署出去的「東西」是不一樣的，因為在訓練過程結束後，你的模型還在記憶體中，如果要部署到其他機器「只做預測」用途的話，通常是把他寫到檔案，再將這個檔案連同專門預測的程式放在各台預測的機器上。這方面的資料可以搜尋 “那個演算法 + serving” 或是 “那個演算法 + deployment” 可能會有些資料</li><li>除非根據上面的考量，其實你只要一個禮拜重新訓練+預測一次就好，也就是預測是跟著訓練一起的（你的打標籤是打在過去看的使用者而且和他們的未來行為無關）</li><li>R 的模型有沒有因為上面的背景而方便預測的方式？我對R不熟不知道有沒有 R 有沒有 serving lib / model serialization 之類的</li><li>如果是 scikit learn 上，最不濟就是用 pickle 把訓練好的model從記憶體寫到檔案，再把預測的程式碼獨立出來讀 model 檔</li><li>以後如果有用到 Tensorflow 的話，有專門做預測/服務的 “Tensorflow serving”</li></ul><p>每一步和每兩步之間都可以講很多，不過這和每個公司、產品、演算法高度相關，這邊先就已知資訊分享一下</p><p>3. 產品策略/了解限制<br>在 2. 講了一點，還有一些可能要考慮的，通常會希望產品端有這些概念後和技術人員一起研究 2. 該怎麼做，<br>同時根據 2. 技術研究後回來和產品端重新思考 3. 的部份</p><ul><li>資料量 / business scale — 拿來做訓練的資料量，以及上線後服務（打標籤）的量</li><li>結果怎麼測量，什麼是好或壞？需要人工介入評量，還是可以自動化用算的（例如點擊率購買率）<br>假設有另一位同事發明了另一個打標籤的model，要怎麼決定哪個 model 比較好？<br>這又分在 C) 還沒上線的階段，以及真正部署出去服務後 E) 的階段</li><li>上線策略：是想要先試水溫，用在一部份用戶？想不想做 AB test 評估比較現行好還是model好？是 MVP, PoC, 或是要一次到位</li><li>A) -&gt; E) Lifecycle：是每天，每月，還是一次性呢？</li></ul><p>上面這些問題為的是一個大目的，了解複雜度、時程和成本。<br>越偏自動化、越頻繁、model 算法越複雜的可能就可以考慮現有幫助，例如 Amazon SageMaker, Kubeflow 等等。<br>反之 MVP, PoC 之類的，或許程式兜一兜就可以先出去試一試了</p><p>* Human harmony? 比較沒有關但我想特別提出來：如果機器 model 標籤標「錯」的話，有沒有留後路讓人工介入矯正</p><p>4. 現有幫助<br>我覺得可以從「執行的東西」和「執行的環境」兩個角度來看<br>1. 執行的東西: sklearn code? TF serving? Java library?<br>2. 執行的環境: 自己架幾台機器？雲端運算用機器 (e.g. AWS EC2)？containerized 而且還要管理部署 (e.g. kubernetes)？<br>雖然兩者也要互相整合，但某種角度這兩個反而可以分開看，需要的技術也是不一樣的（就算是同/不同部門，同/不同人）<br>例如如果只是簡單的 sklearn code 邏輯很簡單，但是生意做很大規模要一千台機器，那會需要兩種知識 (就算是同一個人)<br>a) 能把 sklearn model 變成 serveable code 放到一台機器上的人<br>b) 能把任何 code 部署到 k8s 上的人<br>前者不一定要懂部署營運，後者不一定要懂機器學習。不大清楚您的狀況，或許有可能貴公司已經有後者的人那會輕鬆不少<br>表示只要專心在把 model 能夠在一台機器用 docker 跑就好（當然這是只考慮 D 還沒考慮 A, E 等等）</p><p>如果兩邊都很複雜，那可以考慮其它公司整合的服務，例如前面先進說的 MLflow, Kubeflow, 還有 SageMaker，但是小弟在這塊沒有實戰經驗就不著墨了</p><p>不好意思扯了一堆可能沒有回答到要點，希望能拋磚引玉，留待先進們一起分享</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d61554dacf65" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[筆記: SameSite cookies (and 1st-party, 3rd party etc)]]></title>
            <link>https://medium.com/@ywchen88/%E7%AD%86%E8%A8%98-samesite-cookies-and-1st-party-3rd-party-etc-4b4e0268749d?source=rss-8349b04edcb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b4e0268749d</guid>
            <category><![CDATA[cookies]]></category>
            <category><![CDATA[third-party-cookie]]></category>
            <dc:creator><![CDATA[ywchen]]></dc:creator>
            <pubDate>Fri, 31 Jan 2020 03:40:45 GMT</pubDate>
            <atom:updated>2020-01-31T03:40:45.646Z</atom:updated>
            <content:encoded><![CDATA[<p>基本上看這篇文章就夠了 XD <a href="https://web.dev/samesite-cookies-explained/">https://web.dev/samesite-cookies-explained/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b4e0268749d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[筆記: 用 Google Colab 環境做 Deep learning]]></title>
            <link>https://medium.com/@ywchen88/%E7%AD%86%E8%A8%98-%E7%94%A8-google-colab-%E7%92%B0%E5%A2%83%E5%81%9A-deep-learning-d6f43176a4b3?source=rss-8349b04edcb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/d6f43176a4b3</guid>
            <category><![CDATA[gpu]]></category>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[free]]></category>
            <category><![CDATA[colab]]></category>
            <dc:creator><![CDATA[ywchen]]></dc:creator>
            <pubDate>Fri, 17 Jan 2020 03:19:12 GMT</pubDate>
            <atom:updated>2020-01-17T03:19:12.131Z</atom:updated>
            <content:encoded><![CDATA[<p>Google 很佛心地提供免費的深度學習的執行環境: Google Colab，以 jupyter notebook 作為介面。重點是有免費 TPU 或 GPU 可以使用，推廣深度學習不遺餘力超佛心</p><p>網路上的資源和介紹有很多就不再贅述，這邊只是記錄一些我想記的</p><ul><li>Notebooke Example — BERT : <a href="https://colab.research.google.com/github/tensorflow/tpu/blob/master/tools/colab/bert_finetuning_with_cloud_tpus.ipynb">https://colab.research.google.com/github/tensorflow/tpu/blob/master/tools/colab/bert_finetuning_with_cloud_tpus.ipynb</a></li><li>可以 mount 自己的 Google Drive ，所以資料部分解決了</li><li>可以利用<a href="https://ipython.readthedocs.io/en/stable/interactive/python-ipython-diff.html#shell-assignment">驚嘆號 ! 執行 shell command</a> 去 install 或是 git clone repo，所以程式部分解決了</li><li>TPU runtime environment 不支援 local filesystem，只能用 cloud storage，所以必須要用 GCP account 開 GCS bucket (Google Cloud Storage)。如果只想 mount Google Drive 的話就用 GPU runtime 吧</li><li>每一次拿到的 GPU 種類不一定一樣，目前看過兩種 Tesla P100 PCIE 16GB 和 Tesla K80 ，速度可以差到一倍。可以用 !nvidia-smi -L 看出來現在拿到的是哪種 GPU 。我沒去試可不可以用洗的就是了…</li><li>mount google drive 有 mount 和 flush+unmount 。mount 的時候會出現 one-time auth 要你按，複製 token 再貼到 notebook prompt 就可以</li></ul><pre>from google.colab import drive<br># drive.flush_and_unmount()<br>drive.mount(&#39;/content/drive&#39;, force_remount=True)</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d6f43176a4b3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[筆記: Job queue via Celery]]></title>
            <link>https://medium.com/@ywchen88/%E7%AD%86%E8%A8%98-job-queue-via-celery-d95a554d05ec?source=rss-8349b04edcb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/d95a554d05ec</guid>
            <category><![CDATA[celery]]></category>
            <dc:creator><![CDATA[ywchen]]></dc:creator>
            <pubDate>Sun, 16 Dec 2018 12:34:38 GMT</pubDate>
            <atom:updated>2018-12-16T12:34:38.014Z</atom:updated>
            <content:encoded><![CDATA[<h4><a href="https://hub.docker.com/_/redis">Redis</a> as the broker</h4><ul><li>docker-compose 起不來: <a href="https://medium.com/@ibrahimgunduz34/if-you-faced-an-issue-like-couldnt-connect-to-docker-daemon-at-http-docker-localunixsocket-is-27b35f17d09d">https://medium.com/@ibrahimgunduz34/if-you-faced-an-issue-like-couldnt-connect-to-docker-daemon-at-http-docker-localunixsocket-is-27b35f17d09d</a></li><li>docker-compose.yml</li></ul><pre>version: &quot;3&quot;<br>services:<br>    redis:<br>        image: redis:alpine<br>        ports:<br>            - 127.0.0.1:6379:6379</pre><ul><li>redis-cli ping</li></ul><h4>Launch worker and execute task</h4><p><a href="https://github.com/untitledc/try_celery/tree/master/hello_world">https://github.com/untitledc/try_celery/tree/master/hello_world</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d95a554d05ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Python Decorator 簡介]]></title>
            <link>https://medium.com/@ywchen88/python-decorator-%E7%B0%A1%E4%BB%8B-72717ce4008c?source=rss-8349b04edcb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/72717ce4008c</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[decorators]]></category>
            <dc:creator><![CDATA[ywchen]]></dc:creator>
            <pubDate>Mon, 26 Nov 2018 14:33:49 GMT</pubDate>
            <atom:updated>2018-11-26T14:33:49.880Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-nc-sa/4.0/</cc:license>
            <content:encoded><![CDATA[<p>最近為了內部分享，作了簡介 python decorator 的投影片。很粗淺，只是 yet another python decorator introduction，不過花了稍微多了一點篇幅在「為什麼」會有 decorator，以及前面有些許 function as a first-class citizen 的介紹</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.slideshare.net%2Fslideshow%2Fembed_code%2Fkey%2FLYHTaZQPvnngCV&amp;url=https%3A%2F%2Fwww.slideshare.net%2Fywchen88%2Fpython-decorators-124050068&amp;image=https%3A%2F%2Fcdn.slidesharecdn.com%2Fss_thumbnails%2Fpythondecorators-181126141900-thumbnail-4.jpg%3Fcb%3D1543242168&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=slideshare" width="600" height="500" frameborder="0" scrolling="no"><a href="https://medium.com/media/32c2d6386814271bdb38f9e203c377b0/href">https://medium.com/media/32c2d6386814271bdb38f9e203c377b0/href</a></iframe><p>google slides: <a href="https://docs.google.com/presentation/d/1O0pCsf8eDW10eCsOHxA_KuuF5_Bwfi7fIAsPmR2UqKs/edit#slide=id.p">https://docs.google.com/presentation/d/1O0pCsf8eDW10eCsOHxA_KuuF5_Bwfi7fIAsPmR2UqKs/edit#slide=id.p</a></p><ul><li>不適合會問「什麼是 functools.wraps」的人（裡面沒提到任何 signature, class method, class decorator, …）</li><li>不適合已經會寫 decorator 給其它人用的人</li><li>可能適合看過 @xxx ，但不知道是什麼的人</li><li>可能適合尋找粗淺材料教別人的人？</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=72717ce4008c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[初老] 漂亮的 git log]]></title>
            <link>https://medium.com/@ywchen88/%E5%88%9D%E8%80%81-%E6%BC%82%E4%BA%AE%E7%9A%84-git-log-f766d5cc029?source=rss-8349b04edcb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/f766d5cc029</guid>
            <dc:creator><![CDATA[ywchen]]></dc:creator>
            <pubDate>Tue, 21 Aug 2018 02:30:23 GMT</pubDate>
            <atom:updated>2018-08-21T02:30:23.691Z</atom:updated>
            <content:encoded><![CDATA[<p>老是忘記每次都要重查一遍的「初老」系列 (?)</p><h3>如何有漂亮的 git log</h3><pre>git log --oneline --decorate --all --graph</pre><h3>如何設定 git alias?</h3><p>在 .gitconfig 裡面寫</p><pre>[alias]<br>    l = log --oneline --decorate --all --graph</pre><p>之後打 git l 就可以了</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f766d5cc029" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ubuntu 報稅]]></title>
            <link>https://medium.com/@ywchen88/ubuntu-%E5%A0%B1%E7%A8%85-dfe94f63afad?source=rss-8349b04edcb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/dfe94f63afad</guid>
            <dc:creator><![CDATA[ywchen]]></dc:creator>
            <pubDate>Tue, 01 May 2018 14:48:24 GMT</pubDate>
            <atom:updated>2018-05-01T15:03:25.465Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-nc-sa/4.0/</cc:license>
            <content:encoded><![CDATA[<p>今年 2018 線上報稅是個人有史以來體驗覺得最好的一次，不過在 linux 上還是有些前置作業要做</p><ol><li>在 linux 上要能使用讀卡機</li><li><a href="http://moica.nat.gov.tw/rac_plugin.html">下載、安裝自然人憑證元件</a></li></ol><h3>linux 使用讀卡機</h3><h4>安裝 PC/SC Smart Card Daemon</h4><pre>$ sudo apt install pcscd pcsc-tools</pre><h4>安裝讀卡機驅動程式</h4><p>我使用的讀卡機是虹堡科技的 EZ100PU，剛好廠商有提供<a href="http://www.castlestech.com/zh-hant/%E6%AA%94%E6%A1%88%E4%B8%8B%E8%BC%89/">驅動程式</a></p><p>安裝完、插好讀卡機和卡片後，執行 pcsc_scan 如果沒問題會出現類似這樣的結果</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*NB7564ulSs9ys4Q5kR8zhw.png" /></figure><p>如果 driver 有問題或沒插好之類的大概會這樣</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*IrwK5EL-0Jfbzh-Su09TXQ.png" /></figure><h3>下載、安裝自然人憑證元件</h3><p>線上報稅 <a href="https://efile.tax.nat.gov.tw/irxw/index.jsp">https://efile.tax.nat.gov.tw/irxw/index.jsp</a> 我選擇的是自然人憑證，報稅網站會提示你要安裝自然人憑證元件，會有連結導過去</p><p>下載完 tar ball 以後照著 readme 起 server 就好</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jLbrr7K-Ky3ulhGEZgTRwg.png" /></figure><p>下載自然人憑證元件的網頁有IC卡自我檢測可以檢查，沒有問題的話就可以開始線上報稅了！</p><p>p.s. 用戶口名簿戶號＋查詢碼應該是連讀卡機都不用，不過我沒試過就不多提了，這邊 quote 唐鳳在<a href="https://www.facebook.com/designsurfing/photos/a.317498281684082.56796.315236038576973/1349488865151680/?type=1&amp;theater">某篇 Facebook 文章</a>的留言</p><blockquote><a href="https://www.facebook.com/shu.w.zhengwei?fref=ufi&amp;rc=p">唐鳳</a> 今年全國綜所稅申報戶約630萬戶，其中388萬戶符合稅額試算服務，由國稅局掛號寄發通知書，裡面有查詢碼。</blockquote><blockquote>（如果沒有收到信，也可親自或委託代理人攜帶身份證於各地區國稅局及其分局、稽徵所辦理查調服務取得。）</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dfe94f63afad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Packt 每日一本免費電子書]]></title>
            <link>https://medium.com/@ywchen88/packt-%E6%AF%8F%E6%97%A5%E4%B8%80%E6%9C%AC%E5%85%8D%E8%B2%BB%E9%9B%BB%E5%AD%90%E6%9B%B8-476691dffb55?source=rss-8349b04edcb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/476691dffb55</guid>
            <dc:creator><![CDATA[ywchen]]></dc:creator>
            <pubDate>Thu, 01 Mar 2018 09:38:29 GMT</pubDate>
            <atom:updated>2018-03-01T09:38:29.982Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-nc-sa/4.0/</cc:license>
            <content:encoded><![CDATA[<p>Packt 每天一本免費電子書的活動又開始了: <a href="https://www.packtpub.com/packt/offers/free-learning">https://www.packtpub.com/packt/offers/free-learning</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=476691dffb55" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Andrew Ng “Deep Learning Specialization” RNN (course 5) 感想]]></title>
            <link>https://medium.com/@ywchen88/andrew-ng-deep-learning-specialization-rnn-course-5-%E6%84%9F%E6%83%B3-5a19afd11daa?source=rss-8349b04edcb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a19afd11daa</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[coursera]]></category>
            <dc:creator><![CDATA[ywchen]]></dc:creator>
            <pubDate>Tue, 20 Feb 2018 17:00:41 GMT</pubDate>
            <atom:updated>2018-02-20T17:00:41.458Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-nc-sa/4.0/</cc:license>
            <content:encoded><![CDATA[<p>RNN 是 <a href="https://www.coursera.org/specializations/deep-learning">Deep Learning Specialization</a> 學程的最後一門課，可以處理序列相關的問題，例如自然語言處理、語音辨識等等。<a href="https://www.youtube.com/channel/UCcIXc5mJsHVYTZR1maL5l9w/videos">官方 YouTube 頻道</a>目前只更新了 Week 3 的影片，可能要再看看之後會不會補上 Week 1 &amp; 2</p><p><a href="https://www.coursera.org/specializations/deep-learning#courses">課程大綱</a>主要分三部份：RNN 基本元素、word embedding、以及用 encoder-decoder-attention 來做翻譯</p><h3>循序漸進，從公式出發</h3><p>我很喜歡這門課的循序漸進引出概念，以及從公式出發介紹 GRU 與LSTM。我覺得這課程很適合對 LSTM 不懂的人來看。</p><p>提出了 vanishing gradient 的問題，從而引出 gate 的概念；把 gate 介紹成 bits (0 或 1)，引出了簡化過的 GRU。然後介紹了原版的 GRU 後，最後再拿 LSTM 做比對。並不是因為 LSTM 先發明而先介紹之，而是為了教學易懂是當地調整順序。</p><p>此外在介紹 GRU / LSTM 時也不是直接畫圖，而是用公式來解釋，反而消弭了圖示的不確定和模糊感 — 很多圖其實是給懂的人看的，除非是像<a href="http://colah.github.io/posts/2015-08-Understanding-LSTMs/">有名的 colah 介紹文</a>把式子拆解和圖一起分析。因為講解循序漸進，所以數學式子並不會有壓迫感，反而會覺得很有道理。</p><p>之前自學的時候是直接看 <a href="http://colah.github.io/posts/2015-08-Understanding-LSTMs/">colah’s blog</a> 和 <a href="https://github.com/tensorflow/nmt">Neural Machine Translation</a> 學習，回過頭上這門課以後感覺講解得很清楚。以前自學曾經痛過的，Andrew 在這門課都剛好有把要點提出來</p><h3>程式作業</h3><p>這次的程式作業相較之下比較好玩些。和 Course 4 一樣大量了使用 Keras，也算是個學 Keras 的好機會。雖然解決的問題不像 Course 4 一樣炫麗，不過由於 model 性質，雖然還是填空，但填空感沒那麼重，比較有在 build model 的感覺一些。強烈建議就算是旁聽也值得一做</p><h3>消除偏見</h3><p>除了基本知識，課程還介紹了一個<a href="https://arxiv.org/abs/1607.06520">有趣的研究</a>。word embedding 的例子都已經耳熟能詳了：man 之於 king 相當於 woman 之於 queen 。但沒有想到由於人類長久的偏見，這樣的歷史早已刻寫、反映在我們產生的文本上，所以沒有感情的機器反而會學到這樣的關係：</p><p><strong>father</strong> is to <strong>doctor</strong> as <strong>mother</strong> is to <strong>nurse</strong></p><p>也就是護士會被認為是女性的這種偏見，或者像「男性是工程師、女性是家管」，這種從統計上、從人類過往文字上所學到，但並不代表「因果」或「定數」的知識。</p><p>這堂課簡單介紹了<a href="https://arxiv.org/abs/1607.06520">一些人的研究</a>，用 word embedding 既有的特性來修正自身，矯正這樣的偏見，讓後續的應用也能夠消除這種歧視。我自己覺得介紹這個應用很能突顯 word2vec 的特性，讓 man-woman = king-queen 這種式子更增深度</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a19afd11daa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning & teaching]]></title>
            <link>https://medium.com/@ywchen88/learning-teaching-6791c021cd1f?source=rss-8349b04edcb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/6791c021cd1f</guid>
            <dc:creator><![CDATA[ywchen]]></dc:creator>
            <pubDate>Mon, 19 Feb 2018 04:04:15 GMT</pubDate>
            <atom:updated>2018-02-19T04:04:15.237Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-nc-sa/4.0/</cc:license>
            <content:encoded><![CDATA[<p>I believe learning is like jumping across a big lake by stepping on stones. Sometimes stones are too far away for some people to jump on, and they get stuck or might be frustrated. For me, being a mentor is to help people look for closer stones, to create a stone if necessary, or guide a path, so that they can jump again with their own strength.</p><p>我覺得學習可好比摸石過河，要從知識雲海內找到能夠連結起來的知識石頭，從這一端走到另一端。每個人能踏的石頭都不一樣，如同每個人已經有的知識、能接受的想法都不盡相同</p><p>而對我來說，教學就是當有些人覺得石頭太遠，站在孤島上無法過河的時候，去協助各人發現靠近他們的石頭，或是必要時創造一個石頭，抑或指引出一條路線，讓各人能夠用自己的力量自己的節奏來再次過河</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6791c021cd1f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>