<?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 Stained_Creek on Medium]]></title>
        <description><![CDATA[Stories by Stained_Creek on Medium]]></description>
        <link>https://medium.com/@smart_flax_armadillo_48?source=rss-8c4e9736053d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*FzUcbHEdSJRZ2FD8</url>
            <title>Stories by Stained_Creek on Medium</title>
            <link>https://medium.com/@smart_flax_armadillo_48?source=rss-8c4e9736053d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 10:57:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@smart_flax_armadillo_48/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[Git 學習筆記]]></title>
            <link>https://medium.com/@smart_flax_armadillo_48/git-%E5%AD%B8%E7%BF%92%E7%AD%86%E8%A8%98-8394ca9f8d0a?source=rss-8c4e9736053d------2</link>
            <guid isPermaLink="false">https://medium.com/p/8394ca9f8d0a</guid>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Stained_Creek]]></dc:creator>
            <pubDate>Wed, 10 Apr 2024 05:54:08 GMT</pubDate>
            <atom:updated>2024-04-10T05:54:08.783Z</atom:updated>
            <content:encoded><![CDATA[<p>本文閱讀導引</p><p><em>[數字] 為文章中 reference 區塊所對應，想知道更詳細的內容可點選至該連結</em></p><p>====================正文開始====================</p><p>因原團隊是採用 svn 去進行 co-work 程式交付部分，</p><p>到了新團隊而是選用 git 方式，</p><p>好奇之下去查了兩者有什麼不同 [1]，</p><p>總結自己的體驗如下：</p><p>◆ SVN — 適合小團隊</p><p>◆ GIT — 適合大團隊 (各開發成員權限較平等) // 學習曲線較高</p><p>如果要快速了解 Git 的話可以參閱以下幾張圖 [2] [4]：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lEggFDpIHYHszLHugcqpPA.png" /></figure><p>其中，Git 作用域總共有五項：</p><p>𝟭. <strong>stash (暫存區)</strong></p><blockquote>專案更改檔案後，可暫存的地方</blockquote><blockquote>※ 通常使用情境是切換不同分支時，會須先將目前更改檔案放入 stash 中</blockquote><p>𝟮. <strong>workspace (工作區)</strong></p><blockquote>專案檔案存放於本機硬碟的地方</blockquote><p>𝟯. <strong>index (預存區/索引區)</strong></p><blockquote>也稱為 Staging Area，形成與儲存本次修改檔案快照(Snapshot)的地方</blockquote><blockquote>※ git 是紀錄檔案快照，而不是檔案差異 [5]</blockquote><p>𝟰. <strong>local repository</strong></p><blockquote>專案各版本檔案 (Snapshot) 存放於本機的地方</blockquote><p>𝟱. <strong>remote repository</strong></p><blockquote>專案各版本檔案 (Snapshot) 存放於遠端伺服器的地方</blockquote><blockquote>會需要有 remote repository 是因為要跟各開發成員共同維護專案的關係，如果僅位於 local repository 則他人無法存取自己修改後的檔案狀態</blockquote><p>以下紀錄如果提交後想回推常用的指令 [4]：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*msDVMjpNjkLa12FEkzit0g.png" /></figure><p>Reference</p><p>[1] <a href="https://stevenjhu.com/2019/11/11/%E7%89%88%E6%9C%AC%E6%8E%A7%E7%AE%A1vcs-%E5%9F%BA%E7%A4%8E%E6%A6%82%E5%BF%B5%EF%BC%8Csvn%E3%80%81git%E6%AF%94%E8%BC%83/">[版本控管VCS]-基礎概念，SVN、GIT比較</a></p><p>[2] <a href="https://www.maxlist.xyz/2018/11/02/git_tutorial/">[Git教學] 寫給 Git 初學者的入門 4 步驟</a></p><p>[3] <a href="https://www.youtube.com/watch?v=RGOj5yH7evk">Git and GitHub for Beginners — Crash Course</a></p><p>[4] <a href="https://blog.csdn.net/weiwenhou/article/details/106985423?source=post_page-----c5dc0639dd9">程序员必备基础：Git 命令全方位学习</a></p><p>[5] <a href="https://git-scm.com/book/zh-tw/v2/%E9%96%8B%E5%A7%8B-Git-%E5%9F%BA%E7%A4%8E%E8%A6%81%E9%BB%9E">1.3 開始 — Git 基礎要點</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8394ca9f8d0a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OpenCV.js 初學者上路]]></title>
            <link>https://medium.com/@smart_flax_armadillo_48/opencv-js-%E5%88%9D%E5%AD%B8%E8%80%85%E4%B8%8A%E8%B7%AF-39e59a4c3e61?source=rss-8c4e9736053d------2</link>
            <guid isPermaLink="false">https://medium.com/p/39e59a4c3e61</guid>
            <category><![CDATA[opencv]]></category>
            <dc:creator><![CDATA[Stained_Creek]]></dc:creator>
            <pubDate>Wed, 04 May 2022 09:22:22 GMT</pubDate>
            <atom:updated>2022-05-04T09:22:22.360Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>下載 OpenCV.js</strong></h3><p>到 <a href="https://github.com/opencv/opencv/releases">https://github.com/opencv/opencv/releases</a> 這個連結裡面</p><p>找到 opencv-{VERSION_NUMBER}-docs.zip 類似的檔案進行下載</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*36kVPytI0T5T4O6Ucjk-pA.png" /><figcaption>目前最新版是 4.5.5</figcaption></figure><p>對著壓縮進行解壓縮後，在資料夾內搜尋 OpenCV.js</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BI-i70Yl8G-CHMhP3z9Ceg.png" /></figure><p>複製紅框檔案至專案中即可開始使用</p><h3><strong>Reference</strong></h3><ol><li><a href="https://docs.opencv.org/4.x/d0/d84/tutorial_js_usage.html">OpenCV 官網</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39e59a4c3e61" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Neural Factorization Machines for Sparse Predictive Analytics 論文導讀]]></title>
            <link>https://medium.com/@smart_flax_armadillo_48/neural-factorization-machines-for-sparse-predictive-analytics-%E8%AB%96%E6%96%87%E5%B0%8E%E8%AE%80-fedbc80c8355?source=rss-8c4e9736053d------2</link>
            <guid isPermaLink="false">https://medium.com/p/fedbc80c8355</guid>
            <dc:creator><![CDATA[Stained_Creek]]></dc:creator>
            <pubDate>Tue, 30 Jun 2020 14:57:37 GMT</pubDate>
            <atom:updated>2020-06-30T14:57:37.175Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>NFM<a href="https://arxiv.org/pdf/1708.05027.pdf">論文網址</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/389/1*2MsarVCtMCi5VLw7V3V1FQ.png" /><figcaption>NFM 整體公式</figcaption></figure><p>上圖公式中，</p><p>- 第一項 w0 為 <strong>全域 bias</strong>，</p><p>- 第二項 為 抓取 <strong>一階特徵</strong> 的地方，</p><p>- 第三項 f(x) 為 NFM Model 組件的核心，為抓取 <strong>高階特徵</strong> 的部份，如下圖</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*aI4SvEHOIRgAVUYG00xCQA.png" /><figcaption>Neural Factorization Machines Model</figcaption></figure><p>這邊帶入 <a href="https://github.com/hexiangnan/neural_factorization_machine/blob/master/NeuralFM.py">作者的程式碼 [2] </a>解釋上圖 Neural 結構，</p><h4>Embedding Layer</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*uHZVaX8yORixHkWrfuCcCA.png" /></figure><p>這裡的嵌入方法，不單單只是 embedding table lookup 而已，它還會過濾掉值為 0 的特徵，只留下有資訊的特徵值</p><h4>B-Interaction Layer</h4><p>這裡其實就是使用 FM 的方法 抓取 二階特徵，也是一個 pooling 的操作，將前一層的各個向量組合成一個向量</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/534/1*w46jpeS-GKbfaXiT-Dt_FQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/571/1*IUH95T0390LHqg1nv27RIA.png" /></figure><p>上兩張圖的公式 (3) 及 (4) 是相等的，</p><p>簡略推導 [3] 如下圖，</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WOwj9RVDp1iMJoRuVzOVQw.jpeg" /></figure><p>作者將公式 (3) 變到公式 (4) 是為了顯示出在這層當中並沒有引入額外的模型參數以及它可以有效的線性時間內完成計算，</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*5TrYub5VHK9anp8ID7ovnQ.png" /><figcaption>為公式(4)的第一部份，先 sum 再 平方</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/887/1*1ro6z09thPFC3GQOYqiMHQ.png" /><figcaption>為公式(4)的第二部份，先 平方 再 sum</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/1*Xj094bMGMSlQi8mpnizSQw.png" /><figcaption>完整的公式(4)</figcaption></figure><p>在這層連接下一層 hidden layer 前，作者有加入 Batch Normalization (128)，以及 Dropout (0.5)</p><h4>Hidden Layer</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/510/1*cDEEkF9f1K5Js64gLpra2w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kYG2yx_bheDnxwyjgOCMNw.png" /></figure><p>可以看到 code 128 行，作者將 前一層 B-Interaction Layer (也就是 FM) 所處理後的特徵 ，直接疊加上 DNN ，</p><p>也就是將前一層特徵 x 權重 + bias 後 再丟入 activate function，取出非線性的特徵，</p><p>每一個 hidden layer 都有經過 Batch Normalization (128)，以及 Dropout (0.5)的處理</p><h4>Prediction Layer</h4><p>最後再乘上一個權重，輸出我們的預測值</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/445/1*7oj1kP0bkwC4PvxSE28PKg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*TcEiG0JZ2BqulP3ExzIiMA.png" /></figure><p>最後組成完整的 NFM Model，詳細公式如下圖</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*_sWPtnaozYWnuQEqYihv2w.png" /><figcaption>NFM 整體公式 ( f(x)為第二列的部份 )</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d6fqy6t-KCfDRZE-Ma1gjQ.png" /></figure><p>Bias 為 公式 (7) 中的第一項 w0，</p><p>Feature_bias 為我們一階特徵的部份，如公式 (7) 中的 第二項</p><p>作者與 DeepCross 和 Deep &amp; Wide 作法相比，</p><p>他是直接將 DNN 的部份直接疊加在 B-Interaction 層 (也就是 FM )上，</p><p>這裡直接貼上 DeepCross 與 Deep &amp; Wide 即可看出架構的不同</p><blockquote><a href="https://www.kdd.org/kdd2016/papers/files/adf0975-shanA.pdf">DeepCross 論文網址</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*DXK3jhCu8ZRdGI1nmq6MFg.png" /><figcaption>Deep Crossing Model Architecture</figcaption></figure><blockquote><a href="https://arxiv.org/pdf/1606.07792.pdf">Wide &amp; Deep 論文網址</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gUYpJNhV9rFrJ-fAPYHS_w.png" /><figcaption>Wide &amp; Deep model structure</figcaption></figure><p>上圖右邊 Cross Product Transformation 部份 為 Wide Model ，</p><blockquote>Wide Model主要是使用 Logistic Regression，</blockquote><blockquote>一般來說就是權重 * 特徵＋偏差，並丟入 sigmoid function [1]</blockquote><p>DeepCross 和 Deep &amp; Wide 是直接將輸入的特徵嵌入後直接疊加上 DNN 的結構，如果僅是簡單的將輸入之特徵沒有經過處理直接串接 Neural 結構，那結果會不盡理想</p><p>一直以來，深度學習在 dense data 中， 像是 影像處理 以及 語音辨識 的效能是不錯的，</p><p>但是對於 data mining（資料探勘, DM ） 與 Information Retrieval（信息檢索, IR）這些 sparse data 應用於深度學習中並不常見，</p><p>最後論文中的 Experiment 部份，</p><p>作者發現如果將這些稀疏特徵經由處理後，僅用少層的 Neural Network 結構 ，即可優於現今大多數 DNN 的結構，</p><p>NFM 僅用一層 Hidden layer 的效能即可完勝 Deep &amp; Wide 以及 DeepCross，但作者發現如果再加深 NFM 中的 Hidden layer 層數，效能則會越來越差，這可能是因為在 B-Interaction Layer 已經提供給我們足夠的訊息，如果太深的結構會造成過擬合的狀況</p><p>總結 NFM Model hyperparameter 最終設定</p><p>learning rate: 0.5</p><p>loss function: square loss</p><p>optimizer: Adagrad</p><p>activate function: ReLU</p><p>更詳細內文可至該論文連結觀看，</p><p>如文章有錯誤請底下留言糾正我，非常感謝，</p><p>也希望這篇文章有幫助到需要看 推薦系統 相關 paper 的人 ٩(●ᴗ●)۶</p><h3>Reference:</h3><p>[1] <a href="https://medium.com/data-scientists-playground/wide-deep%E6%A8%A1%E5%9E%8B-%E6%8E%A8%E8%96%A6%E7%B3%BB%E7%B5%B1-%E5%8E%9F%E7%90%86-8badacf777f3">Wide&amp;Deep模型_推薦系統_原理</a></p><p>[2] <a href="https://github.com/hexiangnan/neural_factorization_machine/blob/master/NeuralFM.py">NFM code</a></p><p>[3] <a href="https://www.cnblogs.com/chason95/articles/9477941.html">20180809–0816论文阅读笔记 Neural Factorization Machines for Sparse Predictive Analytics by National Unniversity of Singapore</a></p><p>[4] <a href="https://vimsky.com/zh-tw/article/4298.html">python — tf.nn.embedding_lookup函數有什麽作用？案例詳解</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fedbc80c8355" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[資料夾結構 (目錄結構)]]></title>
            <link>https://medium.com/@smart_flax_armadillo_48/%E8%B3%87%E6%96%99%E5%A4%BE%E7%B5%90%E6%A7%8B-%E7%9B%AE%E9%8C%84%E7%B5%90%E6%A7%8B-b7c87d197c30?source=rss-8c4e9736053d------2</link>
            <guid isPermaLink="false">https://medium.com/p/b7c87d197c30</guid>
            <category><![CDATA[datastrucutre]]></category>
            <dc:creator><![CDATA[Stained_Creek]]></dc:creator>
            <pubDate>Mon, 22 Jun 2020 03:39:16 GMT</pubDate>
            <atom:updated>2020-06-22T03:39:16.342Z</atom:updated>
            <content:encoded><![CDATA[<p>在撰寫技術文章的時候，常常看到別人有類似於以下的結構</p><p><em>來源 [1]</em>：</p><pre>|-- index.html   #blog首頁 (render)<br>|-- _config.yml  #網站設定檔<br>|<br>|---/_includes  #網站結構資料夾<br>|    |--head.html      #標頭檔<br>|    |--sidebar.html   #側欄目錄檔<br>|    |--foot.html   #social links<br>|<br>|---/_layouts   #版型<br>|    |--default.html      #預設版型<br>|    |--page.html   #固定頁面版型，如作者簡介<br>|    |--post.html   #blog發表文章版型<br>|    |--tag.html   #以標籤進行分類</pre><p>因此研究了一下該如何產生，讓之後整個專案交接能更清楚，或者是在開發專案前先計畫好整個大綱，</p><p>在 windows 下可以用 powershell或cmd 下 cd 指令切換至該目錄 [2]，</p><pre>$ tree /f          #顯示目錄結構<br>$ tree /f &gt;&gt;1.txt  #將目錄結構寫入1.txt文件</pre><p>在 linux下可以用 terminal 下 cd 指令切換至該目錄 [3]，</p><pre>$ <em>apt-get install tree</em>         <br>$ tree                   # 即可顯示目錄結構</pre><h3>Reference:</h3><p>[1] <a href="https://tingtinghsu.github.io/blog/articles/2018-12-26-change_them_for_jekyll_blog">更換Jekyll版型記錄</a></p><p>[2] <a href="https://www.itread01.com/content/1547883029.html">windows下如何打印出資料夾目錄結構，並寫入txt</a></p><p>[3] <a href="https://blog.longwin.com.tw/2007/08/tree_output_html_2007/">Linux 快速列出(製作)樹狀目錄結構清單(tree)</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b7c87d197c30" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[使用 git 操作 GitHub]]></title>
            <link>https://medium.com/@smart_flax_armadillo_48/%E4%BD%BF%E7%94%A8-git-%E6%93%8D%E4%BD%9C-github-341d426da52b?source=rss-8c4e9736053d------2</link>
            <guid isPermaLink="false">https://medium.com/p/341d426da52b</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Stained_Creek]]></dc:creator>
            <pubDate>Sat, 20 Jun 2020 13:43:18 GMT</pubDate>
            <atom:updated>2020-06-20T13:43:49.015Z</atom:updated>
            <content:encoded><![CDATA[<p>[數字] 為 reference 所對應，想知道更詳細的內容可點選至該連結</p><p>首先我們先要在自己電腦上產生 SSH (Secure Shell) 金鑰，</p><p>當我們想要進入遠端伺服器，通常會下 ssh username@remote_host，連接成功就可以直接讓遠端伺服器執行我們在本機上下的指令 [2]，</p><p>一般的使用者大部份都是輸入帳號密碼來做登入，但是在輸入帳號密碼的同時也增加了被竊取帳密的可能性。為了降低被竊取的可能性，可以使用公開金鑰(Public Key)和私密金鑰(Private Key)對應的方式，近而做到免密碼的登入，來降低風險 [3]</p><p>首先在安裝好 git 的電腦搜尋 git Bash 並打開，然後進行以下操作 [5,6]：</p><pre>$ ssh-keygen -t rsa -b 4096 -C &quot;<em>your_github_email@example.com</em>&quot;</pre><p>接著就是一直 Enter 到底，接著在電腦裡面 <em>id_rsa.pub</em> 的檔案，打開並複製裡面的內容，</p><p>接著到 github 的 Setting 中點選 <em>SSH keys and GPG keys</em>，點選 綠色按鈕 New SSH key，</p><p>將 key 那欄貼上剛剛複製的內容，</p><p>Title 可以填寫你是在哪個電腦上遠端到 github 上的敘述，</p><p>這樣就完成了 此正在操作電腦 與 github 伺服器的連接了，也就是可以對你的github repository 中檔案進行 創建、更新、刪除操作</p><pre># 複製你的目錄到本電腦<br>$ git clone &quot;your repository (Clone with SSH)&quot;</pre><pre># 切換本電腦到此目錄<br>$ cd &quot;your repository&quot;</pre><pre># 查看此目錄狀態是否有被更改，如有，紅字部分則是表示被更動的檔案<br>$ git status</pre><pre># 增加此更動的檔案<br>$ git add &quot;add_file_name.txt/py...etc&quot;</pre><pre># 確認此次變更，並加上你對這次變更的註解<br>$ git commit -m &quot;your_comment&quot;</pre><pre># 上傳至 github 進行更新的動作<br>$ git push</pre><h3>Reference</h3><p>[1] <a href="https://git-scm.com/book/zh-tw/v2/GitHub-%E5%BB%BA%E7%AB%8B%E5%B8%B3%E6%88%B6%E5%8F%8A%E8%A8%AD%E5%AE%9A">6.1 GitHub — 建立帳戶及設定</a></p><p>[2] <a href="https://jennycodes.me/posts/security-ssh">[Security] 你該知道所有關於 SSH 的那些事</a></p><p>[3] <a href="https://ithelp.ithome.com.tw/articles/10080136">SSH 免用密碼登入(key)</a></p><p>[4] <a href="https://www.youtube.com/watch?v=py3n6gF5Y00">github基本教學 — 從無到有</a></p><p>[5] <a href="https://help.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent">Generating a new SSH key and adding it to the ssh-agent</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=341d426da52b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MERN youtube 影片心得及整理]]></title>
            <link>https://medium.com/@smart_flax_armadillo_48/mern-youtube-%E5%BD%B1%E7%89%87%E5%BF%83%E5%BE%97%E5%8F%8A%E6%95%B4%E7%90%86-d139ab31547c?source=rss-8c4e9736053d------2</link>
            <guid isPermaLink="false">https://medium.com/p/d139ab31547c</guid>
            <category><![CDATA[youtube]]></category>
            <category><![CDATA[reactjs]]></category>
            <dc:creator><![CDATA[Stained_Creek]]></dc:creator>
            <pubDate>Mon, 24 Feb 2020 07:55:20 GMT</pubDate>
            <atom:updated>2020-02-24T07:55:20.807Z</atom:updated>
            <content:encoded><![CDATA[<p>Learn the MERN Stack — Full Tutorial (MongoDB, Express, React, Node.js)</p><p>網址：<a href="https://www.youtube.com/watch?v=7CqJlxBYj-M&amp;list=TLPQMjQwMjIwMjClSzcp2swyRQ&amp;index=3">https://www.youtube.com/watch?v=7CqJlxBYj-M&amp;list=TLPQMjQwMjIwMjClSzcp2swyRQ&amp;index=3</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/1*bBTobjKn-GMHTePhjj5OMw.png" /></figure><p>Mongoose : Mongoose 是 MongoDB 的前端，MongoDB 是一個使用面向文檔數據模型的開源 NoSQL 數據庫</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t3aK-P_NpFRDZKM21EBHHQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QqCQ1NyGv2-CRUcJ1bTF1g.png" /><figcaption>BSON之名緣於JSON，含義為Binary JSON，能用來表示簡單資料結構、關聯陣列（MongoDB中稱為「物件」或「文件」）以及MongoDB中的各種資料類型</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*YsT3ZGBjXJzx0ylzmx_8kg.png" /><figcaption>MongoDB 中每個 Document 的 id</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*o8GfgSGYULpy_D2c0MY0Zw.png" /><figcaption>這些像 HTML 的語法，名為 JSX，在語法裡面可以使用 Javascript 的 expressions</figcaption></figure><p>在 React 中用 component 去呈現前端頁面，當資料更新時，會使用re-render()方法重新刷新 component</p><p>主要是做紀錄運動狀況的 CRUD APP</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d139ab31547c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Udemy 課程筆記 — TensorFlow 2.0 (第四週)]]></title>
            <link>https://medium.com/@smart_flax_armadillo_48/udemy-%E8%AA%B2%E7%A8%8B%E7%AD%86%E8%A8%98-tensorflow-2-0-%E7%AC%AC%E5%9B%9B%E9%80%B1-95914436f180?source=rss-8c4e9736053d------2</link>
            <guid isPermaLink="false">https://medium.com/p/95914436f180</guid>
            <category><![CDATA[udemy]]></category>
            <category><![CDATA[tensorflow]]></category>
            <dc:creator><![CDATA[Stained_Creek]]></dc:creator>
            <pubDate>Sat, 21 Dec 2019 13:39:19 GMT</pubDate>
            <atom:updated>2019-12-21T13:39:19.511Z</atom:updated>
            <content:encoded><![CDATA[<h3>Udemy 課程筆記 — TensorFlow 2.0 (第四週)</h3><blockquote><a href="https://www.coursera.org/learn/introduction-tensorflow/home/welcome">課程網站</a></blockquote><blockquote>Introduction to TensorFlow for Artificial Intelligence, Machine Learning, and Deep Learning</blockquote><p>為了訓練神經網絡，輸入數據都<strong>必須具有相同的大小</strong>，因此需要調整圖像的大小以使其一致 (在前幾堂課程中，我們所使用的圖像長寬比皆是MNIST整理好並且相同 28x28 的 data set)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/1*1K0HKE-TJgfqIIJ3k2KlDw.png" /><figcaption>但是，當您遇到不同大小的圖像且該subject可能位於不同的位置時會發生瓶頸</figcaption></figure><p>使用TensorFlow中的圖像生成器可以解決以上問題</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*cuodcELADsL7flNT0nzM3g.png" /><figcaption>紅色框表示目錄，灰色框部分則是ImageGenerator自動產生的label</figcaption></figure><p>圖像生成器的一個功能是，您可以將其指向一個目錄，然後該目錄的子目錄將自動為您生成 label</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*DkjUuP_aM3Dg0G_InsxMhw.png" /><figcaption>The image generator class is available in Keras.preprocessing.image</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yqP5riEvycOLYV8SiRu1iQ.png" /><figcaption>train 目錄 中 image label 產生方式</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*lkt5NSqRfbh9ltgSA7bU1A.png" /><figcaption>test 目錄 中 image label 產生方式</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*OYYzm6wxubHQ89MuDZcMeg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*deKo_yYa6C7ogXjoaoT0zA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/1*GurkNp592tPY8XOqYJIZsA.png" /><figcaption>編譯(compile) model 必須包含 optimizer 及 loss function</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TiE9TIlMH8Q3Qw4huwh3kg.png" /></figure><p>訓練完模型後，接著對模型進行一些預測</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s_ENNZO3SxCJCqdi0Y3pAA.png" /></figure><p><a href="https://www.zhihu.com/question/36307214/answer/364963552">loss function 理解</a> (<a href="https://gombru.github.io/2018/05/23/cross_entropy_loss/">課程所附的網址</a>)(<a href="https://github.com/lmoroney/dlaicourse/blob/master/Course%201%20-%20Part%208%20-%20Lesson%202%20-%20Notebook.ipynb">code網址</a>)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95914436f180" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Udemy 課程筆記 — TensorFlow 2.0 (第三週)]]></title>
            <link>https://medium.com/@smart_flax_armadillo_48/udemy-%E8%AA%B2%E7%A8%8B%E7%AD%86%E8%A8%98-tensorflow-2-0-%E7%AC%AC%E4%B8%89%E9%80%B1-b333a905afff?source=rss-8c4e9736053d------2</link>
            <guid isPermaLink="false">https://medium.com/p/b333a905afff</guid>
            <category><![CDATA[udemy]]></category>
            <category><![CDATA[tensorflow]]></category>
            <category><![CDATA[convolutional-network]]></category>
            <dc:creator><![CDATA[Stained_Creek]]></dc:creator>
            <pubDate>Fri, 20 Dec 2019 08:34:05 GMT</pubDate>
            <atom:updated>2019-12-20T08:34:05.757Z</atom:updated>
            <content:encoded><![CDATA[<h3>Udemy 課程筆記 — TensorFlow 2.0 (第三週)</h3><blockquote><a href="https://www.coursera.org/learn/introduction-tensorflow/home/welcome">課程網站</a></blockquote><blockquote>Introduction to TensorFlow for Artificial Intelligence, Machine Learning, and Deep Learning</blockquote><p>當我們 print 圖片 28x28 像素值時，可以很明顯看到有很多浪費的空間</p><p>我們可以利用CNN( Convolution Neural Network )來去壓縮圖像空間，使圖像僅保留特徵的地方(也就是數值不為0的地方)</p><blockquote><strong>what’s convolution?</strong></blockquote><blockquote>如果您曾經進行過任何類型的圖像處理，通常都需要使用一個 Filter 並將該Filter 傳遞到圖像上，以更改基礎圖像</blockquote><p>The idea here is that some convolutions will change the image in such a way that certain features in the image get emphasized.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hBFozxd5bvoYnsMzNB_UMQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4jfreavPb-pR2Q_0IskQ9w.png" /><figcaption>垂直線經由卷積後變突出</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FvayqEMluwkr9U82UG5OWg.png" /><figcaption>水平線經由卷積後變突出</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_yJkuBrqh2gvd7bGMhKTSw.png" /><figcaption>卷積後加上 pooling 會減少運算量，此圖是max-pooloing (pooling is a way of compressing an image)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/1*lh-mhEd-Fm2UOzGsIqK3_g.png" /></figure><p>第一層 Conv2D 有 64 個 filter，filter的大小為3x3，激勵函數是採用relu，圖像輸入為28x28，1是表示只有灰階，其中filter會跟fit函數一樣慢慢學習， 當將 Conv2D 層作為模型的第一層時，請提供關鍵字參數input_shape</p><p>第二層為 max-pooling 層，它從2x2像素中挑選出最大的一個出來，進而壓縮影像</p><p>然後我們添加另一個卷積層和另一個 max-pooling 層，以便 network 可以在現有卷積之上學習另一組卷積，然後再次pooling以減小大小。</p><p>因此當圖像到達 Flatten 層進入 Dense 層時，它已經小得多了。它先是四分之一，然後再四分之一，並含帶特徵</p><p>model.summary方法，使您可以檢查模型的各層</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*c2buojk5Pfp8KAn1RaLFUQ.png" /><figcaption>CNN + DNN</figcaption></figure><p>第一層 output shape 是因為輸入圖像 28x28 經由 3x3 filter 後會減少2個像素，如果是5x5 filter 則會減少4個像素(這裡stride預設是1)</p><blockquote><a href="https://www.itread01.com/content/1544593982.html">圖片卷積輸出大小計算公式</a></blockquote><blockquote>輸入圖片大小 W×W<br>Filter大小 F×F<br>步長 S<br>padding的畫素數 P<br>於是我們可以得出</blockquote><blockquote>N = (W − F + 2P )/S + 1</blockquote><blockquote>輸出圖片大小為 N×N</blockquote><p>第二層 output shape 是由 2x2 去取出 26x26 各 4 個像素最大的值， 所以長和寬26各 ÷ 2 = 13</p><p>最後我們得到 26(filter) 張 不同特徵的 5x5 的圖片</p><p>在 flatten 層的 output shape，您將得到 25(5x5) 像素乘以64，即1600</p><p><strong>現在，您已經了解瞭如何通過在頂部添加卷積層並將網絡針對卷積結果而不是原始像素進行訓練</strong></p><blockquote>you looked at convolutions and got a glimpse for how they worked.</blockquote><blockquote>By passing filters over an image to reduce the amount of information, they then allowed the neural network to effectively extract features that can distinguish one class of image from another.</blockquote><blockquote>You also saw how pooling compresses the information to make it more manageable. This is a really nice way to improve our image recognition performance.</blockquote><p><a href="https://colab.research.google.com/github/lmoroney/dlaicourse/blob/master/Course%201%20-%20Part%206%20-%20Lesson%202%20-%20Notebook.ipynb#scrollTo=IXx_LX3SAlFs">完整程式碼</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*k9qxppMaKx2vnXczw98nGw.png" /><figcaption>keras API 可以讓我們看各層的視覺化</figcaption></figure><p><a href="https://lodev.org/cgtutor/filtering.html">Image filter 教學網站</a></p><p><a href="https://colab.research.google.com/github/lmoroney/dlaicourse/blob/master/Course%201%20-%20Part%206%20-%20Lesson%203%20-%20Notebook.ipynb">Convolution 運作示例</a> (超推薦看，一看就懂)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b333a905afff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Udemy 課程筆記 — TensorFlow 2.0 (第二週)]]></title>
            <link>https://medium.com/@smart_flax_armadillo_48/udemy-%E8%AA%B2%E7%A8%8B%E7%AD%86%E8%A8%98-tensorflow-2-0-%E7%AC%AC%E4%BA%8C%E9%80%B1-115639d3915e?source=rss-8c4e9736053d------2</link>
            <guid isPermaLink="false">https://medium.com/p/115639d3915e</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[tensorflow]]></category>
            <dc:creator><![CDATA[Stained_Creek]]></dc:creator>
            <pubDate>Mon, 16 Dec 2019 05:38:47 GMT</pubDate>
            <atom:updated>2019-12-16T05:38:47.052Z</atom:updated>
            <content:encoded><![CDATA[<h3>Udemy 課程筆記 — TensorFlow 2.0 (第二週)</h3><blockquote><a href="https://www.coursera.org/learn/introduction-tensorflow/home/welcome">課程網站</a></blockquote><blockquote>Introduction to TensorFlow for Artificial Intelligence, Machine Learning, and Deep Learning</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*WWXHXjxHfkfgLdi0N-UEzQ.png" /><figcaption>computer vision輸入的圖片大小越小越好，盡可能只保留特徵，以減少計算量</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*YVKXNTS76RJx_OlvZa8S_g.png" /><figcaption>使用數字9 label 鞋子是因為比起各國語言label，電腦對於數字的理解能力反而更好</figcaption></figure><p>The last time you had your six pairs of numbers, so you could hard code it. This time you have to load 70,000 images off the disk, so there’ll be a bit of code to handle that.</p><p>但在 <strong>TensorFlow</strong> 套件中讀入 <strong>MNIST</strong> 是<em>很容易的</em>，不論是訓練資料或者測試資料，都有分 images 與 labels 屬性</p><p>聲明 object 為 MNIST，即可用Keras加載此dataset，在此object上如果調用load data method，則會返回4個list (訓練數據，訓練標籤，測試數據和測試標籤)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gomUP6N_TfDpabt_x0rK1w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/551/1*PiytyOMP1p-UCrHUrIvOnw.png" /><figcaption>3層NN，最重要的是觀察第一層和最後一層</figcaption></figure><p>第三層的10代表有十個神經元，分類出最終答案：10種不同種類的鞋子</p><p>第二層隱藏層的128代表有128個神經元，也就是x1,x2….,x128，可視為<strong>函數中的變量</strong>，也就是我們要求出數字9的話，我們需要將權重w1乘上變量x1+權重w2乘上變量x2+....+權重w128乘上變量x128</p><p>第一層 flatten layer 輸入的 shape 是 28x28，主要的功用是用來將 28x28 變成 simple linear array — &gt; 784x1</p><blockquote>輸入層和輸出層的層數、大小是最容易確定的。每個網絡都有一個輸入層，一個輸出層。輸入層的神經元數目等於將要處理的數據的變量數。輸出層的神經元數目等於每個輸入對應的輸出數，隱藏層則是要劃出分類邊界的數量 (<a href="https://kknews.cc/zh-tw/tech/za6ke33.html">引用網址</a>)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XMVH972uTukdv4fGrDGvwA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/325/1*TCIkwAgN_-ad-SJEjRXx6A.png" /><figcaption>可以用matplotlib把圖像顯示出來，print()則是把0~255像素值用28x28陣列方式呈現</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/448/1*r27KMRzymd5mXyh_6k3iPA.png" /><figcaption>圖像的像素值作歸一化(normalized)對神經網路運作較好，所以 ÷255，在python中對陣列作除法可以不使用for loop</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/1*B0W9peolGcWOHCjKwKkgLg.png" /><figcaption>當model已定義好，接著則可用compile(包含所選擇的optimizer和loss function)編譯，之後則可開始使用 fit 訓練使得輸入圖像接近label</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/418/1*cO0BBOp16eg8y9EFGsQsjw.png" /><figcaption>訓練好後，使用evaluate將測試資料丟入評估model是否不錯</figcaption></figure><p><a href="https://colab.research.google.com/github/lmoroney/dlaicourse/blob/master/Course%201%20-%20Part%204%20-%20Lesson%202%20-%20Notebook.ipynb"><em>colab code 網址</em></a><em> (但是tf版本是1.15.0版)</em></p><blockquote>How can I stop training when I reach a point that I want to be at?</blockquote><blockquote>the training loop does support <strong>callbacks</strong></blockquote><blockquote>in every epoch, you can callback to a code function, having checked the metrics. If they’re what you want to say, then you can cancel the training at that point.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*thzA0-URNnaAIvcVvkl6tA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=115639d3915e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Udemy 課程筆記 - TensorFlow 2.0 (第一週)]]></title>
            <link>https://medium.com/@smart_flax_armadillo_48/udemy-%E8%AA%B2%E7%A8%8B%E7%AD%86%E8%A8%98-tensorflow-2-0-%E7%AC%AC%E4%B8%80%E9%80%B1-538a2ed4ce2e?source=rss-8c4e9736053d------2</link>
            <guid isPermaLink="false">https://medium.com/p/538a2ed4ce2e</guid>
            <category><![CDATA[tensorflow2]]></category>
            <category><![CDATA[udemycourses]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Stained_Creek]]></dc:creator>
            <pubDate>Wed, 11 Dec 2019 06:12:31 GMT</pubDate>
            <atom:updated>2019-12-11T06:12:31.865Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><a href="https://www.coursera.org/learn/introduction-tensorflow/home/welcome">課程網站</a></blockquote><blockquote>Introduction to TensorFlow for Artificial Intelligence, Machine Learning, and Deep Learning</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*TcSqeQoBjwoEgb4ysGP24g.png" /><figcaption>The new paradigm is that I get lots and lots of examples and then I have labels on those examples and I use the data to say this answers, then rules being inferred by the machine</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XTMHHTHlnIm8P7NLkeNrsQ.png" /><figcaption>machine learning is all about a computer learning the patterns that distinguish things</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/1*hOZPDKa6VPstOdHnVCKLmw.png" /><figcaption>ML is to infer this formula: 2X-1</figcaption></figure><p>The following code is Tensorflow + Python + Keras</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*0Jf0qRAltRmLnHUs5AkNkA.png" /><figcaption>The simplest possible neural network is one that has only one neuron in it, and that’s what this line of code does.</figcaption></figure><p>In keras, you use the word dense to define a layer of connected neurons. There’s only one dense here.</p><p>So there’s only one layer and there’s only one unit in it, so it’s a single neuron. Successive layers are defined in sequence, hence the word sequential.</p><p>you can see that our input shape is super simple. It’s just one value.</p><p>機器學習，需要了解和使用大量數學、概率及優化模型等，TensorFlow和keras的好處是，很多數學功能都可直接使用</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/603/1*RZdQLmzLxGnwdSPormty1Q.png" /><figcaption>There are two function roles that you should be aware of though and these are loss functions and optimizers.</figcaption></figure><p>The neural network has no idea of the relationship between X and Y,so it makes a guess. The set of Xs and Ys that we’ve already seen to measure how good or how bad its guess was.</p><p>loss functions測量X與Y資料的差距，optimizers找出下一個guess</p><blockquote>Then the logic is that each guess should be better than the one before. As the guesses get better and better, an accuracy approaches 100 percent</blockquote><blockquote>— 這過程稱為convergence</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/635/1*Tc4pyFavUTyBhhucFxdrhg.png" /><figcaption>The np.array is using a Python library called numpy that makes data representation particularly enlists much easier.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/310/1*EF-WEDJ4z5h35Cn3CdvStg.png" /><figcaption>The training takes place in the fit command. Here we’re asking the model to figure out how to fit the X values to the Y values.</figcaption></figure><blockquote>epochs等於500意味著它將經歷500次訓練循環</blockquote><blockquote>我們前面已經描述了這個訓練循環。進行猜測，用loss function衡量猜測的好壞，然後使用optimizers和數據進行另一次猜測並重複此步驟。</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/301/1*ZAJ2noHZeHSBuL4oYaEbuA.png" /><figcaption>模型完成訓練後，它將使用預測方法返回值</figcaption></figure><p>因此，它以前從未見過10，而將其傳遞給10時，它將返回什麼呢？</p><p>現在可能會認為它將返回19，因為畢竟Y=2X-1。但是當嘗試此操作時，將會看到它將返回非常接近19的值，但是不完全是19。</p><p>這是因為 1.數據量太少 2. 並且神經網路並不是以Integer表示，而是Float</p><p>When using neural networks, as they try to figure out the answers for everything, they deal in probability.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=538a2ed4ce2e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>