<?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 Cecile Liu on Medium]]></title>
        <description><![CDATA[Stories by Cecile Liu on Medium]]></description>
        <link>https://medium.com/@CecileLiu?source=rss-c929596e6d0b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*SaX6AHfpbSzJykHLFYEw5A.jpeg</url>
            <title>Stories by Cecile Liu on Medium</title>
            <link>https://medium.com/@CecileLiu?source=rss-c929596e6d0b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 22:49:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@CecileLiu/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[Amateurs talk Strategy, Professionals talk Logistics]]></title>
            <link>https://medium.com/@CecileLiu/amateurs-talk-strategy-professionals-talk-logistics-5826a52787dc?source=rss-c929596e6d0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/5826a52787dc</guid>
            <dc:creator><![CDATA[Cecile Liu]]></dc:creator>
            <pubDate>Sun, 06 Jul 2025 16:32:51 GMT</pubDate>
            <atom:updated>2025-07-06T16:32:51.128Z</atom:updated>
            <content:encoded><![CDATA[<p>This phrase gave me strong impression. After I heard it, I keep asking myself, what is strategy and what is logistics to a Data Scientist. Of course I ask “AI” this question, and here’re compilation of their answers.</p><h3>If you were AI team lead,</h3><blockquote>Strategy defines the <strong>direction </strong>, <strong>goals </strong>, and <strong>value proposition </strong>of your AI efforts. It answers the <em>why </em>and <em>what </em>, not the <em>how </em>. As a leader, strategic thinking involves aligning your team’s work with broader organizational goals, identifying high-impact problems, and positioning your team for long-term success.</blockquote><blockquote>Logistics is about<strong> execution at scale</strong> . It encompasses the <em>tools</em>, <em>infrastructure</em>, <em>processes</em>, <em>talent</em>, and <em>resources </em>that make the strategy possible. Without solid logistics, even the best strategy will fail.</blockquote><p>Isn’t it weird? As we all know higher-level management, or many public speeches are all about <em>direction </em>, <em>goals </em>, and <em>value proposition</em><strong> </strong>of AI. <strong>In fact, things aren’t as straightforward as the answer makes them seem</strong>. Speakers tend to seize the opportunity to share good story of their product or company, so <em>direction </em>, <em>goals </em>, and <em>value proposition </em>are the materials of the story. Second, the audience may come from different field or may not have the same background knowledge as the speakers have, so <em>direction </em>, <em>goals </em>, and <em>value proposition</em> are the token to enter the wonderland.</p><p>Then when should the Logistics come into play? <strong>Internal meeting.</strong> <br>Logistics help a team lead make less-biased decision, ask for more resources and collaborate smoothly in cross-department task.</p><p>So let’s take a closer look what questions Amateurs and Professional will ask at AI team lead role .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-nuecIJmxQlPon5--cT_Sw.png" /><figcaption><em>Strategy is important</em>, but alone it doesn’t ship a single model or move a metric</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pm-HhLxEvSXu0yYCC2hKZA.png" /><figcaption><em>Logistics is where most failures happen.</em></figcaption></figure><p>For example:</p><ul><li>If your <strong>strategy </strong>is to <em>build a state-of-the-art language model for customer support,</em> your <strong>logistics </strong>might involve setting up large-scale training clusters, curating diverse dialogue datasets, and building a real-time inference API with latency guarantees.</li><li>If your <strong>strategy </strong>is to<em> push the frontiers of meta-reinforcement learning</em>, your <strong>logistics </strong>need to include simulation environments, fast iteration cycles, and reproducible benchmarking frameworks.</li></ul><p>A best leaders are bilingual : fluent in both vision and execution. They inspire with strategy but ground themselves in logistics.</p><p>Let’s explore more.</p><h3>If you were a CTO,</h3><blockquote>At the CTO level, the nature of strategy and logistics changes , not just in content but in <strong>scope, abstraction level, </strong>and <strong>time horizon</strong>. Strategy becomes more about <em>alignment </em>, <em>impact </em>, and <em>leverage </em>across the entire organization; strategy means <em>deciding what not to do</em>, because every choice commits talent and capital. Logistics is about scaling the system that enables all teams to execute well . A hallmark of a strong CTO is the ability to connect high-level strategy to operational reality .</blockquote><p>Remember we said “Logistics help a team lead collaborate smoothly in cross-department task.”? It resonate Logistics of a CTO.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UzxaM2GzY8_9xhAVp2R1OQ.png" /><figcaption>Strategy as a CTO: The Big Picture</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AFDV5eCPKXJtYH6hhUcn0Q.png" /><figcaption>Logistics as a CTO: Scaling the System</figcaption></figure><p><strong>Strategy :</strong></p><p>&quot;We will become the leading provider of enterprise language models tailored for legal domains.&quot;</p><p><strong>Logistics :</strong></p><ul><li>Legal data acquisition pipelines with privacy guarantees</li><li>In-house fine-tuning infrastructure optimized for domain adaptation</li><li>Hiring legal NLP experts + regulatory compliance officers</li><li>Budgeting for specialized compute and licensing agreements</li></ul><h3>💡Does the above content match your experience? Look forward to hearing everyone’s experience or opinion.</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5826a52787dc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[二分法的區間 — 網路上最詳盡的解說]]></title>
            <link>https://medium.com/@CecileLiu/%E4%BA%8C%E5%88%86%E6%B3%95%E7%9A%84%E5%8D%80%E9%96%93-%E7%B6%B2%E8%B7%AF%E4%B8%8A%E6%9C%80%E8%A9%B3%E7%9B%A1%E7%9A%84%E8%A7%A3%E8%AA%AA-5adf3be3bc5e?source=rss-c929596e6d0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/5adf3be3bc5e</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[leetcode]]></category>
            <category><![CDATA[binary-search]]></category>
            <dc:creator><![CDATA[Cecile Liu]]></dc:creator>
            <pubDate>Sun, 10 Oct 2021 12:05:31 GMT</pubDate>
            <atom:updated>2021-10-15T06:29:31.374Z</atom:updated>
            <content:encoded><![CDATA[<h3>二分法的區間 — 網路上最詳盡的解說</h3><p>歡迎轉載並附上原文連結：<a href="https://medium.com/@CecileLiu/%E4%BA%8C%E5%88%86%E6%B3%95%E7%9A%84%E5%8D%80%E9%96%93-%E7%B6%B2%E8%B7%AF%E4%B8%8A%E6%9C%80%E8%A9%B3%E7%9B%A1%E7%9A%84%E8%A7%A3%E8%AA%AA-5adf3be3bc5e">二分法的區間 — 網路上最詳盡的解說 — Cecile Liu — Medium</a></p><p>— — — — — — — — — — — 10/15 update — — — — — — — — — — — — — <br>今天遇到了無法用區間規則解的題目，所以記錄一下。input array的特性為&quot;先non-descending再non-ascending&quot;、&quot;只有non-descending&quot;這兩種，找出array中element的最大值。<br>-------------------------------------------------------------------------------------------------------</p><p>最近在補刷code，發現自己algorithm還有很多需要學習的，因此從頭開始把一些東西補足。在二分法中，讓人最痛苦的大概就是區間設定以及其衍伸問題，例如：<br><strong>1. left and right的初始值如何設定？<br>2. mid的初始值如何設定？<br>3. while的中止條件該如何設定？<br>4. left and right的更新到底要+1還是-1？<br>5. return 該return 什麼？</strong></p><p>首先，這裡只會舉最常看到的兩種區間來解釋，<strong>左閉右閉</strong>以及<strong>左閉右開</strong>這兩種。但因為區間的基本觀念很簡單，所以不浪費篇幅解釋，請參閱<a href="https://web.ntnu.edu.tw/~algo/Programming.html">這裡</a>。</p><p>我們從程式碼的區間觀念開始，在Python中常見的for loop為<em>for i in range(n)</em>，如果<em>print(n)</em>則會看到<strong>0, 1, 2, …, n-1</strong>，在程式碼中給定的明明是n，輸出的最大值卻只有到n-1，因此這就是<strong>左閉右開</strong>（不包含n）。在Python不方便舉例<strong>左閉右閉</strong>，因此我們底下用C code來說明。</p><pre>//左閉右開<br>for (int i=0; i&lt;n; i++)<br>    cout &lt;&lt; array[i] &lt;&lt; &#39;\n&#39;;<br>//左閉右閉<br>for (int i=0; i&lt;=n-1; i++)<br>    cout &lt;&lt; array[i] &lt;&lt; &#39;\n&#39;;</pre><p>從C code可以發現，採用<strong>左閉右開</strong>的策略的話可以少loop一次，因此常見的會是<strong>左閉右開</strong>的策略。</p><p>那麼，如果不是<em>for i in range(n)</em>的形式，而是二分法中採用指針left and right來進行loop的話，該怎麼寫出<strong>左閉右開</strong>或<strong>左閉右閉</strong>呢？這個問題，就是上面5個問題的集合，因此接下來會一題一題說明。</p><ol><li><strong>left and right的初始值該如何設定？</strong><br>自己開心就好。如果想使用<strong>左閉右閉</strong>，則<em>left, right = 0, len(array)-1</em>；如果想使用<strong>左閉右開</strong>，則<em>left, right = 0, len(array)</em>。</li><li><strong>mid的初始值如何設定？</strong><br>講到middle value最容易聯想到的就是average value，所以可能會覺得<em>mid = (left+right)//2</em>（<em>//</em>的意思是取&quot;商數&quot;），但是，假設left一直更新一直變大，終究會造成<em>mid &gt; len(array)</em>，就是所謂的&quot;溢出&quot;，會產生error。因此，常用的是<em>mid = left + (right-left)//2</em>。</li><li><strong>while的中止條件該如何設定？</strong><br>遵循原則：保持區間設定一致。也就是說，如果在left and right的設定使用<strong>左閉右閉</strong>，那麼while的中止條件也必須是<strong>左閉右閉</strong>，反之亦然。因為<strong>左閉右開</strong>為 “不包含n”，所以終止條件：<em>while left&lt;right</em>；而<strong>左閉右閉</strong>的中止條件：<em>while left≤right</em>。</li><li><strong>left and right的更新到底要+1還是-1？</strong><br>我們用圖片協助解釋。<br>（Figure 1）當mid &lt; target，我們要將left往右移動，因為這時候已經知道mid不是我們要的，所以不管是<strong>左閉右閉</strong>或<strong>左閉右開</strong>，<em>left = mid+1</em>。<br>（Figure 2）當mid &gt; target，我們要將right往左移動，已經確認mid不是答案，所以如果選擇<strong>左閉右開（不考慮n）</strong>，<em>right = mid</em>；選擇<strong>左閉右閉</strong>，<em>right=mid-1</em>。<strong>**提醒</strong>：要維持區間一致。</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/929/1*Xnpom_l64NxFq-GKjghtUg.png" /><figcaption>Figure 1. When mid &lt; target, how do we update left or right?</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*DNd9Goj5z9XU4mkeVv4NmA.png" /><figcaption>Figure 2. When mid &gt;target, how do we update left or right?</figcaption></figure><p>5. <strong>return 該return什麼？</strong><br>我們分普通題和變化題來說明。</p><p><strong>普通題：給定一個array，找出target value的index。</strong><br>這時候可以看出使用<strong>左閉右開</strong>的另一個優點，因為left一定在範圍內，所以while跑完後，return left。</p><p><strong>變化題1：給定一個array，找出target value的index，如果找不到，則返回target value應該插入的index。</strong><br><strong>變化題2：找出target value開根號的整數值，如果開根號的值不是整數，則返回最接近的整數。</strong><br>這2題看起來很像，好像target value都會有機會落在index=k, k+1中間，例如8開根號是2.82842....，就是介於2和3中間。我們藉由下面圖片來看使用<strong>左閉右閉</strong>和<strong>左閉右開</strong>來解這2題的過程。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*v5tBAtr_GeCzzUcX1vGR_g.png" /><figcaption>Figure 3. Use different strategy to find the right index of 6 when array=[0,1,2,3,4,5,7,8]. (Upper) 左開右閉；(Lower) 左閉右閉</figcaption></figure><p>給定array為[0,1,2,3,4,5,7,8]，要找target value=6的index，正確的答案是6，所以如果最後return left，不管用哪一種區間策略，都會正確。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/649/1*GtwYAGw6XQqTwlVWH4G38A.png" /><figcaption>Figure 4. Use different strategy to find the closest integer whose square value equals to 8. (Upper) 左開右閉；(Lower) 左閉右閉</figcaption></figure><p>要找到8的開根號值或最接近的整數值，正確答案是2，所以如果最後return left，不管哪一種區間策略，都會錯誤。<strong>為什麼會有這樣的差別？</strong></p><p>首先，可以發現<strong>題目跟&quot;使用哪種區間策略&quot;無關</strong>，只要<strong>保持區間一致</strong>就好。因此，魔鬼就藏在return這一環節。</p><p>假設在夢中，變化題1的left可以被&quot;定位&quot;到那個不存在的index（5.5），那麼醒來之後，因為5.5已經超過5，所以left會等於6，而題目的要求就是插入新的index，因此，return left沒有問題。</p><p>假設在夢中，變化題2的left可以被&quot;定位&quot;到那個不存在的index（2.82842），那麼醒來之後，因為left已經超過2了，所以會被&quot;定位&quot;在3，但題目要求不能超過，因此需要return (left-1)。</p><p>有什麼想法都歡迎提出，也歡迎轉載並附上原文連結：<a href="https://medium.com/@CecileLiu/%E4%BA%8C%E5%88%86%E6%B3%95%E7%9A%84%E5%8D%80%E9%96%93-%E7%B6%B2%E8%B7%AF%E4%B8%8A%E6%9C%80%E8%A9%B3%E7%9B%A1%E7%9A%84%E8%A7%A3%E8%AA%AA-5adf3be3bc5e">二分法的區間 — 網路上最詳盡的解說 — Cecile Liu — Medium</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5adf3be3bc5e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From CNN to GCN]]></title>
            <link>https://medium.com/@CecileLiu/from-cnn-to-gcn-40a42e95827a?source=rss-c929596e6d0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/40a42e95827a</guid>
            <category><![CDATA[graph-neural-networks]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Cecile Liu]]></dc:creator>
            <pubDate>Wed, 05 Feb 2020 19:08:22 GMT</pubDate>
            <atom:updated>2020-02-05T19:08:22.970Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*gtlP6ne94EyIOgXxBiURqA.png" /></figure><p>There are many mathematical detail omitted in <a href="https://openreview.net/pdf?id=SJU4ayYgl">semi-supervised classification with graph convolutional networks</a>, therefore I wrote a memo to explain these detail.</p><p>I study the paper and lots of online source, here is the reference: (most of them are in Chinese)<br> <a href="https://ccjou.wordpress.com/2012/04/19/%E9%9B%A2%E6%95%A3%E5%82%85%E7%AB%8B%E8%91%89%E8%BD%89%E6%8F%9B/">https://ccjou.wordpress.com/2012/04/19/%E9%9B%A2%E6%95%A3%E5%82%85%E7%AB%8B%E8%91%89%E8%BD%89%E6%8F%9B/</a><br> <a href="https://brilliant.org/wiki/chebyshev-polynomials-definition-and-properties/">https://brilliant.org/wiki/chebyshev-polynomials-definition-and-properties/</a><br><a href="http://www.mhtl.uwaterloo.ca/courses/me755/web_chap6.pdf">http://www.mhtl.uwaterloo.ca/courses/me755/web_chap6.pdf</a><br> <a href="https://zhuanlan.zhihu.com/p/54505069">https://zhuanlan.zhihu.com/p/54505069</a><br><a href="http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/OWENS/LECT4/node2.html">http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/OWENS/LECT4/node2.html</a><br> <a href="https://mathoverflow.net/questions/231987/why-decompose-a-function-with-eigenvectors-of-laplace-operator">https://mathoverflow.net/questions/231987/why-decompose-a-function-with-eigenvectors-of-laplace-operator</a><br> <a href="https://zhuanlan.zhihu.com/p/81502804">https://zhuanlan.zhihu.com/p/81502804</a><br> <a href="https://zhuanlan.zhihu.com/p/50742283">https://zhuanlan.zhihu.com/p/50742283</a><br> <a href="https://www.youtube.com/watch?v=c0MR-vWiUPU">https://www.youtube.com/watch?v=c0MR-vWiUPU</a><br> <a href="https://zhuanlan.zhihu.com/p/67336297">https://zhuanlan.zhihu.com/p/67336297</a><br><a href="https://archwalker.github.io/blog/2019/06/16/GNN-Spectral-Graph.html">https://archwalker.github.io/blog/2019/06/16/GNN-Spectral-Graph.html</a><br> <a href="https://zhuanlan.zhihu.com/p/76296353">https://zhuanlan.zhihu.com/p/76296353</a><br> <a href="https://purelyvivid.github.io/2019/07/07/GCN_1/">https://purelyvivid.github.io/2019/07/07/GCN_1/</a></p><h3>Prerequisite</h3><p>Degree matrix, adjacency matrix, Fourier transform, Chebyshev polynomial.<br>I’ll not explain these concepts, but you can find the detail of them from the above links.</p><h3>Track of thought</h3><p>1.Laplace operator is always mentioned in GCN (graph convolutional network), why?</p><p>2.We start from the definition of convolution:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/264/1*irxVbyBF1HcwtDtf0LxYEA.png" /><figcaption>definition of convolution</figcaption></figure><p>(Wiki) It is defined as the integral of the product of the two functions after one is reversed and shifted. But in that context, the convolution formula can be described as a weighted average of the function f(τ) at the moment t where the weighting is given by g(–τ) simply shifted by amount t. As t changes, the weighting function emphasizes different parts of the input function.</p><p>According to the above definition, it is hard to do convolution in graph structure. However, we know it’s possible to use Fourier transform to achieve the convolution of discontinuous function.</p><p>3. Take discontinuous function Fourier transform as an example, let’s see what GCN needs.</p><p>First, define the Fourier transform and inverse Fourier transform, and then do a little calculation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/494/1*y60kgppartTSlKlUDQKYFg.png" /><figcaption>(left) Fourier transform ; (right) inverse Fourier transform</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*txZG4B1VGIQT_0NksDZGNA.png" /></figure><p>We found that the result of “multiply the Fourier transform of two functions” is equivalent to the result of “the Fourier transform of the product of two functions”. It seems like the Fourier transform can ‘lead’ the functions into a space where the convolution is the multiplication.</p><p>4.Where and what is the ‘Fourier transform thing’ in graph? Laplace operator.</p><p>5.Why Laplace operator? First, we look deeply into the formula of Fourier transform and Euler’s formula:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*v0NjRxG9_PB35CvNAAxQ9g.png" /><figcaption>ξ means the frequency</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/315/1*fz1ByBJkNzKxTRd-mSyfmw.png" /><figcaption>Euler’s formula</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/1*d4ZcCd_tqTVek5xLb4UPiQ.png" /></figure><p>We know that the assumption of Fourier transform is that every signal can be composed by multiple sinusoidal functions with different frequencies. Usually we called these sinusoidal functions as basis.And this concept is much alike the representation of a vector, for example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/323/1*VYa15LwP_qynk7xEiJKsiw.png" /><figcaption>representation of a vector</figcaption></figure><p>We can write <strong>v</strong> as the sum of its projections onto these 3 basis vectors. Second, if we apply Laplace operator to e^(2πiξt):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/1*eOWOjOqEm0eEn2syiFRwfA.png" /><figcaption>Δ is the Laplace operator</figcaption></figure><p>The basis of Fourier transform is the eigenvector of Laplace operator. (Actually the exponential used in Fourier series is eigenvalues of shifts, and thus of any operator commuting with shifts, not just Laplacian.) So what is the basis for graph to do its transform?</p><p>6.Before we start to find the basis of graph’s transform, we take time to know more about Laplace operator.</p><p>7.What is the meaning of Laplace operator? Mathematically, it is the gain of adding some disturbance to the matrix.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*1A1knq9BxZDlnIKnnL87Pw.png" /></figure><p>We can see from the above figure, after applying Laplace operator to f, we have the sum of the outputs of f with little addition or extraction.</p><p>From the physics point of view, the Laplace operator is the divergence of first order derivative, and divergence is the sum of flux in certain area. Therefore, we can deduce, in graph, Laplace operator represents the sum of gradients of connected node.</p><p>8.The gradient of node? What is it?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/263/1*sVopERCvF-uh04h6t5aBVQ.png" /><figcaption>definition of gradient</figcaption></figure><p>The edges are orthogonal in graph. According to the definition of gradient, we can define, <em>for any node V0</em> , <em>the gradient component in the V0-to-V1 direction is as follows.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/1*IgZXjqJKGVCzrkkK6RMcDw.png" /><figcaption>d is the distance of two nodes; F is the function of graph; e is the edge weight</figcaption></figure><p>9.From the gradient-of-graph to the calculation of Laplace operator in graph.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/923/1*Mk4HqBagW34R8-j2lLC-oA.png" /></figure><p>10.After we know how to calculate Laplace operator in graph, what does it mean if we apply Laplacian matrix to a graph?</p><p>It means both the direction and the smoothness of ‘ energy flowing’ after we apply ‘ a potential’ to one node.</p><p>11.Finally, we can calculate the basis for the graph to do the transformation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qEvoO5o7UAxx08MJ4ktZFQ.png" /></figure><p>12.The transformation of graph.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_on2sJpMi69D8us9SSRm4g.png" /></figure><p>13.As we mentioned in point 3, the multiplication of two transform is equal to the convolution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-2Nk-t7GT3erXhrM5jsPIw.png" /></figure><p>14.And then? In traditional CNN, we use kernel to output the feature of image, and then do back propagation to update the weight of kernels. We do the same thing in graph convolution. The goal is to find the best kernels for different tasks.</p><p>This is just the prelude of GCN.</p><p>15.The evolution of GCN.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tebXH8RwrNidblCmcPGsOw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oDHlCyIk5YZY8wm7f42cvQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gBsQEV0Rh48DKUU7aohbiQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x04b6SiqQMtYEtvOgB7ZWw.png" /></figure><p>16. Visualization of GCN.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/296/1*_iJ-IuJrGJRHEoIzh_freA.png" /><figcaption>The simple expression of GCN</figcaption></figure><p><em>AX</em> represents how much information my neighbors will take from me in this convolution operation; <em>DX</em> represents how much information I have before convolution, that is, how much information I took from neighbors in the previous convolution operation. Therefore, <em>DX</em> minus <em>AX</em> is the distribution of information in this convolution operation. And this is <strong>exactly</strong> the definition of divergence (Laplace operator).</p><p>So every convolution operation is about the ‘flow’ of information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hgfWY97YXAd8bAZD231LIQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40a42e95827a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Semi-supervised learning (note of ML class of Hung-Yi Lee)]]></title>
            <link>https://medium.com/analytics-vidhya/semi-supervised-learning-note-of-ml-class-of-hung-yi-lee-3aed0a7207f1?source=rss-c929596e6d0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/3aed0a7207f1</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[graph]]></category>
            <category><![CDATA[semi-supervised-learning]]></category>
            <dc:creator><![CDATA[Cecile Liu]]></dc:creator>
            <pubDate>Wed, 05 Feb 2020 16:06:13 GMT</pubDate>
            <atom:updated>2020-02-18T04:14:09.427Z</atom:updated>
            <content:encoded><![CDATA[<p>Lecture video: <a href="https://www.youtube.com/watch?v=fX_guE7JNnY&amp;list=PLJV_el3uVTsPy9oCRY30oBPNLCo89yu49&amp;index=21">https://www.youtube.com/watch?v=fX_guE7JNnY&amp;list=PLJV_el3uVTsPy9oCRY30oBPNLCo89yu49&amp;index=21</a></p><p>It is a good tutorial lecture for everyone in semi-supervised learning. If you understand Chinese, this lecture will be a good choice.<br>All figures inside this post come from this lecture.</p><p>The very first of semi-supervised learning is that we have to know the difference between ‘<em>transductive</em>’ and ‘<em>inductive</em>’ learning. <br> — Transductive learning: use testing set as unlabeled data, but not use the label of testing set.<br> — Inductive learning: find more data as unlabeled data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*9ac3pRVsA1D-XWG0lQ-Pwg.png" /><figcaption>semi-supervised learning in generative model</figcaption></figure><p>How semi-supervised learning is implemented in generative model?</p><ol><li>Initialize the parameters of model by random initialization or by pre-trained model.</li><li>Step 1: compute the posterior probability of unlabeled data</li><li>Step 2: update the prior probability and mean of unlabeled data</li><li>Use the new prior and mean back to step 1 to update the posterior probability</li></ol><p>The whole process looks like EM( Expectation Maximization ) algorithm, where step 1 is ‘E’ and step 2 is ‘M’.</p><p>2 assumptions are often used in implementation of semi-supervised learning, which are low-density separation and smoothness assumption.</p><h3><strong>Low-density separation (Black and white world)</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*1tHBIL0mJsu8zXlUKi8Tiw.png" /><figcaption>the most typical case of low-density separation in semi-supervised learning is self-training</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/531/1*I8i8t8FB0L79l7wbh2wKTQ.png" /></figure><p>Although self-training looks much like semi-supervised learning in generative model, we often use hard label in self-training and use soft label in generative model. Why? If we use soft label in NN model, for example, [0.7 0.3] for the new target, we’re unable to update the model because the new target is the same as the original label.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*HbE1-gSH3z0lUD2O_hj95Q.png" /><figcaption>how unlabeled data be able to update the model</figcaption></figure><p>How to let ‘unlabeled data → labeled data’ influence the model training? Modify the loss function! We calculate the entropy of the calculated output(new label) and add it to loss function as a regularized term. We all know that the NN training focus on minimizing the loss, therefore the entropy of the new label is also in the minimization process.</p><p>Why it works? Take a look at the left part of the above picture. While doing classification, we always expect the output can be ‘simple’. If the probability of all classes are much close, we’ll consider the model still require more time to train. And it is bad. According to this concept, we know that the smaller the output entropy, the better the output. Further, it meets the assumption of low-density separation.</p><h3>Smoothness assumption</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*w2myRf3-A6FvjkxCPYXxMw.png" /><figcaption>concept of smoothness assumption</figcaption></figure><p>The concept of smoothness assumption is that if the points are in the same high density cluster, the probability of being the label is high. In other words, if we find the close points belong to the same label, this model(function) is smooth.</p><p>We’ll use 2 examples to explain this concept.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/408/1*QAvRvzf_iOSPuDV30NHRAQ.png" /><figcaption>example 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*3PFICGCf6LHia_S0rVPJnw.png" /><figcaption>example 2</figcaption></figure><p>In example 1, if NN saw picture 1, 2 and 3 in the beginning, it may think picture 2 and 3 are belong to the same label. As we collect more data (picture 4~7), we’ll discover that picture 1, 2 and 4~7 may ‘in the same high density region’, therefore they should be the same class.</p><p>The example 2 is the document classification. In the beginning, there are only document 1, 2, 3 and 4 in the data set, where document 1 is class 1, document 4 is class 2 and document and 3 are unlabeled data. It is hard for model to do the right classification of document 2 and 3. After we collect more documents, we’ll be able to do the right classification.</p><p>We can extend the cluster to the graph as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*obzEx_G6nobhisiq2tsp-w.png" /></figure><p>If the nodes are in the same connected graph, the higher probability they’ll be the same class. The troublesome is the number of data set.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/267/1*EVTJ6W4MJBsSZJu3fvlG7A.png" /><figcaption>example of insufficient data</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*62j7XDVsv6Hbh9-x3iofbw.png" /><figcaption>method of make points into graph</figcaption></figure><p>We use deep autoencoder to extract the data(both labeled and unlabeled data) feature, and do clustering. Then connect the neighbors to form a graph. We can also calculate the reciprocal of Gaussian RBF as the weight of edge.</p><p>After the graph is constructed, how to combine the concept of graph and semi-supervised learning?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/433/1*74tO2Y-BjOoR2YfEnzNb_w.png" /><figcaption>1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/427/1*RhTR1NLJdt91Xk1J8wZkUw.png" /><figcaption>2</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*0IV9QbZ4yoVVmNq6NkAaMg.png" /><figcaption>3</figcaption></figure><p>(Figure 1) We define the smoothness of graph. The node embedding of graph example in figure is scalar, however the node embedding is usually a matrix in real world.</p><p>(Figure 2) The smoothness function of graph in matrix form.</p><p>(Figure 3) Add smoothness to the loss function as a regularization term. Then update the model parameter. Then again calculate the smoothness….</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3aed0a7207f1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/semi-supervised-learning-note-of-ml-class-of-hung-yi-lee-3aed0a7207f1">Semi-supervised learning (note of ML class of Hung-Yi Lee)</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Java : Thread — 1]]></title>
            <link>https://medium.com/@CecileLiu/java-thread-1-deef25c4f433?source=rss-c929596e6d0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/deef25c4f433</guid>
            <category><![CDATA[multithreading]]></category>
            <category><![CDATA[process]]></category>
            <category><![CDATA[threads]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Cecile Liu]]></dc:creator>
            <pubDate>Sat, 31 Aug 2019 11:30:54 GMT</pubDate>
            <atom:updated>2019-09-01T06:22:57.145Z</atom:updated>
            <content:encoded><![CDATA[<h3>Java : Thread — 1</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*cq3aLPq5Np3Sz01Y" /><figcaption><a href="https://relicate.com/products/strongbond-rainbow-thread">https://relicate.com/products/strongbond-rainbow-thread</a></figcaption></figure><p>I try to figure out thread in java, therefore I grab a <a href="https://www.books.com.tw/products/E050028912">book</a> , study and take a note here. My note will include 6 sections which are: <br>1. Thread and process<br>2. How to<br>3. Simple example of how-to<br>4. Lambda example<br>5. Thread methods<br>6. Concurrency, synchronization and thread safe<br><strong>Part 1</strong> contains sections 1~3, and <strong>part 2</strong> contains sections 4~6.</p><h3>Thread and Process</h3><p><strong>Process</strong>, a running application of an operating system. System will allocate resources and CPU Time for each <strong>process</strong>. When we run more than one applications(<strong>processes</strong>), resources are exclusively owned by applications(<strong>processes</strong>). That is, every application(<strong>process</strong>) has its own resource and CPU Time.<br>Note that each CPU Time of each application(<strong>process</strong>) is actually a Time Slice. Since we have a high performance CPU, it’s not easy to notice cutover between time slices. And we call this OS, a <em>multitasking</em> OS.<br><em>An example of multitasking: at the same time, we listen to the music by media player and write code using Eclipse.</em></p><p>But what if we watch a clip on YouTube and download a file at the same time, and moreover, they are done by Chrome. We call it ‘<em>multi-threading</em>’. <strong>Thread</strong> is an execution process of a <strong>process</strong>, and one <strong>process </strong>can have many <strong>threads</strong>. Therefore, <strong>threads</strong> of the same <strong>process</strong> share the resource and it’s a very important issue of multi-threading. We will discuss it more in later section.</p><h3>How to</h3><p>There are 2 ways to create threads. <br>1. By extending Thread class<br>2. By implementing Runnable interface</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M1dVYDVAmt8cKRape1L3qw.png" /></figure><h3>Simple example of How-to</h3><p><strong><em>&lt;the first example code comes from </em></strong><a href="https://www.books.com.tw/products/E050028912"><strong><em>this book</em></strong></a><strong><em>, and the other example codes are modified by myself.&gt;</em></strong></p><pre>// Example of &#39;directly construct a thread object&#39;</pre><pre>package rate1;</pre><pre>public class Rate1 {</pre><pre>    public static void main (String[] args) {</pre><pre>        Thread tortoise = new Thread () {<br>            public void run () {<br>                for (int i=1 ; i&lt;=20 ; i++){<br>                    System.out.print(&quot;tortoise ran &quot; + i + &quot; km.&quot;);<br>                }<br>                System.out.print(&quot;tortoise arrive!!&quot;);<br>            }<br>        };</pre><pre>        Thread rabbit = new Thread () {<br>           public void run () {<br>               for (int i=4 ; i&lt;=20 ; i+=4) {<br>                   if ((int) (Math.random() *10+1)%2 == 0){<br>                       System.out.print(&quot;rabbit takes a rest.&quot;);<br>                       i-=4;<br>                   } else {<br>                       System.out.print(&quot;rabbit ran &quot; + i + \\<br>                       &quot; km.&quot;);<br>                   }<br>               }<br>               System.out.print(&quot;rabbit arrive!!&quot;);<br>           }<br>        };</pre><pre>        rabbit.start();<br>        tortoise.start();</pre><pre>    }<br>}</pre><pre>// Example of &#39;New class extends Thread class&#39;</pre><pre>package rate1;</pre><pre>class Tortoise extends Thread {<br>    public void run () {<br>        for (int i=1 ; i&lt;=20 ; i++) {<br>            System.out.print(&quot;tortoise ran &quot; + i + &quot; km.&quot;);<br>        }<br>        System.out.print(&quot;tortoise arrive!!&quot;);<br>    }<br>}</pre><pre>class Rabbit extends Thread {<br>    public void run () {<br>        for (int i=4 ; i&lt;=20 ; i+=4){<br>            if ((int) (Math.random() *10+1)%2 == 0){<br>                System.out.print(&quot;rabbit takes a rest.&quot;);<br>                i-=4;<br>            } else{<br>            System.out.print(&quot;rabbit ran &quot; + i + &quot; km.&quot;);<br>            }<br>        }<br>    System.out.print(&quot;rabbit arrive!!&quot;);<br>    }<br>}</pre><pre>public class Rate2 {<br>    public static void main (String[] args) {<br>    <br>        Tortoise obT = new Tortoise();<br>        Rabbit obR = new Rabbit();<br>        obT.start();<br>        obR.start();<br>    }<br>}</pre><pre>// Example of &#39;New class implement Runnable interface&#39;</pre><pre>package rate1;</pre><pre>class Tortoise implements Runnable {<br>    public void run () {<br>        for (int i=1 ; i&lt;=20 ; i++) {<br>            System.out.print(&quot;tortoise ran &quot; + i + &quot; km.&quot;);<br>        }<br>        System.out.print(&quot;tortoise arrive!!&quot;);<br>    }<br>}</pre><pre>class Rabbit implements Runnable{<br>    public void run () {<br>        for (int i=4 ; i&lt;=20 ; i+=4){<br>            if ((int) (Math.random() *10+1)%2 == 0){<br>                System.out.print(&quot;rabbit takes a rest.&quot;);<br>                i-=4;<br>            } else{<br>            System.out.print(&quot;rabbit ran &quot; + i + &quot; km.&quot;);<br>            }<br>        }<br>    System.out.print(&quot;rabbit arrive!!&quot;);<br>    }<br>}</pre><pre>public class Rate3 {<br>    public static void main (String[] args) {<br>    <br>        Thread obT = new Thread(new Tortoise());<br>        Thread obR = new Thread(new Rabbit());<br>        obT.start();<br>        obR.start();<br>    }<br>}</pre><p>For sections 4~6, please see <strong>Part 2</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=deef25c4f433" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data processing — 1: pd.read_csv()]]></title>
            <link>https://medium.com/@CecileLiu/data-processing-1-pd-read-csv-4b8bb061d62a?source=rss-c929596e6d0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b8bb061d62a</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Cecile Liu]]></dc:creator>
            <pubDate>Fri, 30 Aug 2019 07:22:40 GMT</pubDate>
            <atom:updated>2019-08-30T07:22:40.003Z</atom:updated>
            <content:encoded><![CDATA[<h3>Data processing — 1: pd.read_csv()</h3><p>Recently I have chance to deal with structured/semi-structured data(<a href="https://daxpowerbi.com/%E7%B5%90%E6%A7%8B%E5%8C%96%E8%B3%87%E6%96%99/#anchor_3">definition</a>), and it’s a whole new world to me. Therefore I decide to start over and note what I learn.</p><p>From <a href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html">pandas.read_csv document</a>, we see there are many parameters of this API. This article is to memo the usage of some parameters.</p><p>Data source: <a href="http://archive.ics.uci.edu/ml/datasets/Individual+household+electric+power+consumption">http://archive.ics.uci.edu/ml/datasets/Individual+household+electric+power+consumption</a></p><h3>(GCP Datalab) Read files stored in Cloud Storage</h3><p>%gcs list<br>%gcs list -o gs://predict_0821<br>%gcs read -o gs://predict_0821/household_power_consumption.txt -v price</p><p>First, list all buckets. Second, list all files inside a specific bucket. Last, read a file as an object call ‘price’.</p><h3>pd.read_csv() — 1</h3><p>import pandas as pd<br>from io import BytesIO<br>df = pd.read_csv(BytesIO(price), sep = ‘;&#39;)<br>df.head(5)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8aPNaVkLtIecSctkY8AjjA.png" /></figure><p>I believe this is the simplest way in reading file to DataFrame, and everything seems normal except there’s a warning. It says there are columns having mixed types.</p><h3>pd.read_csv — 2</h3><p>Why this warning showed up? <br>Because the parameter <strong><em>low_memory</em></strong> is set <strong>True</strong> in default. That will enable Pandas to check every dtype of columns while reading files. It costs time and is not exactly necessary, therefore we add a parameter in pd.read_csv()：</p><p>df2 = pd.read_csv(BytesIO(price), sep = ‘;&#39;, low_memory=False)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/926/1*PUdI22yN-QcN5CsWyfO51A.png" /></figure><p>Warning message is gone though, problems remain. Further, we can use one more method to know that if we read file in such a simple command, we will get trouble in the future processing.</p><p>df2.info()</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/511/1*eO1KEr9BcTMYUsT-KnLC1w.png" /></figure><p>What ?! Why all the columns are objects ?</p><h3>pd.read_csv() — 3</h3><p>First guess, there exists NaN or null value inside. So we add na_values=[‘?’], it means that NA/NaN will be set to ‘?’.</p><p>df3 = pd.read_csv(BytesIO(price), sep=’;’, low_memory=False, na_values=[‘?’])<br>df3.info()</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/874/1*v5yXOxabFHY9W0pkhor1fg.png" /></figure><p>Not bad! Right now we only have 2 columns are recognized as object. And take a closer look we can find that those 2 columns are ‘<strong>Date</strong>’ and ‘<strong>Time</strong>’.</p><h3>pd.read_csv() — 4</h3><p>There are 2 parameters deal with date/time format, and they are <strong><em>parse_dates</em></strong> and <strong><em>infer_datetime_format</em></strong>.</p><p>df4 = pd.read_csv(BytesIO(price), sep=’;’, low_memory=False, na_values=[‘?’], infer_datetime_format=True, parse_dates={‘DT’ : [‘Date’, ‘Time’]})<br>df4.info()</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jjnvCD_Hx_MQrynIB8Ij4g.png" /></figure><p>Good! The annoying ‘object’ is gone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AqibtX9-bKHq28xAI0VrRw.png" /></figure><h3>pd.read_csv() — 5</h3><p>We can further do a trick to make this Dataframe ‘lovely’.</p><p>df5 = pd.read_csv(BytesIO(price), sep=’;’, low_memory=False, na_values=[‘?’], infer_datetime_format=True, parse_dates={‘DT’ : [‘Date’, ‘Time’]}, index_col=’DT’)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*lkSlqsdI4FayDdWrdldw4Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GDV1yS8puOhSdbfxBXZloA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b8bb061d62a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why LSTM cannot prevent gradient exploding?]]></title>
            <link>https://medium.com/@CecileLiu/why-lstm-cannot-prevent-gradient-exploding-17fd52c4d772?source=rss-c929596e6d0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/17fd52c4d772</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[vanishing-gradient]]></category>
            <category><![CDATA[backpropagation]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[lstm]]></category>
            <dc:creator><![CDATA[Cecile Liu]]></dc:creator>
            <pubDate>Wed, 26 Jun 2019 03:37:30 GMT</pubDate>
            <atom:updated>2019-06-26T03:37:30.723Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/863/0*cPTetBrnAeLnfzwm.png" /><figcaption>LSTM</figcaption></figure><p>There are many opinions online related to gradient-vanishing/gradient-exploding in LSTM. Some say that LSTM can prevent both from happening, some say LSTM cannot. I choose to believe that LSTM can prevent gradient vanishing but not gradient exploding. And this post is to explain the reason.</p><p>When I study back propagation of LSTM, there’s one resource that is easy to understand to me. Most math formulae of this post came from that article.<br> <a href="https://towardsdatascience.com/only-numpy-deriving-forward-feed-and-back-propagation-in-long-short-term-memory-lstm-part-1-4ee82c14a652">https://towardsdatascience.com/only-numpy-deriving-forward-feed-and-back-propagation-in-long-short-term-memory-lstm-part-1-4ee82c14a652</a></p><p>And I’d like to thank everyone who giving me the clue.<br><a href="https://medium.com/@CecileLiu/nlp-from-beginning-lstm-73c9e47433d2">This is</a> my previous post about LSTM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZCM_Wk4gOYD3Sog-OwfTfQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zHum5Q7PG298cB93ii7GjQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gX_PtauEBrLgVZWBbit76Q.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fh6tHwwkryA97eSCAJWJfw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5f8p5nlk-tYMPL4cSlG5kg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dJd1z2tqVArufMDLzn5rSQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k0-Hg6YVLQiaU4SqZ7XOQQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PCzlTpwVQwR4T6nBAgGHqA.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=17fd52c4d772" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Intro — BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding]]></title>
            <link>https://medium.com/@CecileLiu/intro-bert-pre-training-of-deep-bidirectional-transformers-for-language-understanding-308566d3177e?source=rss-c929596e6d0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/308566d3177e</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[bert]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[language-modeling]]></category>
            <dc:creator><![CDATA[Cecile Liu]]></dc:creator>
            <pubDate>Wed, 12 Jun 2019 01:04:41 GMT</pubDate>
            <atom:updated>2019-06-12T01:04:41.842Z</atom:updated>
            <content:encoded><![CDATA[<h3>Intro — BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding</h3><p>References: <a href="https://spaces.ac.cn/archives/4122">https://spaces.ac.cn/archives/4122</a><br>https://www.jiqizhixin.com/articles/2018-12-10-8<br>http://jalammar.github.io/illustrated-bert/</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4gNQochsVJ7OddULOfzWWw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ytMG7YAqOGzQeipMBiB-9w.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CuBLmMLAIwEjpBT6UZQ2YQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ma7vGJMTvAMMmGTL8rTjTQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sqBPs1Pe1b2rOgYoIIFCIg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lTHV0ac17LruTspIhE2oWA.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=308566d3177e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[(Eng version)Train your own SSD MobileNet object detection model on Windows 10]]></title>
            <link>https://medium.com/@CecileLiu/eng-version-train-your-own-ssd-mobilenet-object-detection-model-on-windows-10-adfed558252d?source=rss-c929596e6d0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/adfed558252d</guid>
            <category><![CDATA[mobilenet]]></category>
            <category><![CDATA[transfer-learning]]></category>
            <category><![CDATA[tensorflow]]></category>
            <dc:creator><![CDATA[Cecile Liu]]></dc:creator>
            <pubDate>Fri, 31 May 2019 01:31:20 GMT</pubDate>
            <atom:updated>2019-05-31T01:31:20.430Z</atom:updated>
            <content:encoded><![CDATA[<p>Chinese version: <a href="https://medium.com/@CecileLiu/train-your-own-ssd-mobilenet-object-detection-model-on-windows-10-931208218344">https://medium.com/@CecileLiu/train-your-own-ssd-mobilenet-object-detection-model-on-windows-10-931208218344</a></p><p><a href="https://medium.com/@CecileLiu/object-detection-part-3-single-shot-multibox-detector-ssd-mobilenet-v1-mobilenet-v2-7a8355403b9f">Know more about SSD and MobileNet</a></p><p>Tensorflow provides many pre-trained models, and it will save us many efforts. (<a href="https://cloud.tencent.com/developer/article/1006123">Reference 1</a>) (<a href="http://wossoneri.github.io/2017/12/12/%5bTensorflow%5dTrain-model-with-SSD-MobileNet/">Reference 2</a>) (<a href="https://github.com/datitran/raccoon_dataset">Reference 3</a>)</p><h3>Tools Preparation:</h3><p>Download: <a href="https://github.com/tensorflow/models">Tensorflow models repo</a>、<a href="https://github.com/datitran/raccoon_dataset">Raccoon detector dataset repo</a>、 Tensorflow object detection <a href="https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md">pre-trained model</a> (here we use ssd_mobilenet_v1_coco)、 <a href="https://github.com/tensorflow/models/issues/1591">protoc-3.3.0-win32</a></p><p>Tensorflow models folder: C:/Users/Documents/models-master<br>Raccoon detector folder: C:/Users/Documents/ raccoon _dataset-master<br>Pre-trained model folder: C:/Users/Documents/ssd_mobilenet_v1_coco</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*6efk4vXb7yI3QHAU4TXIxw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*om94-HRAeuUmki0hIWqG9A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*AzaOOUbYVy-1p9VvE9UWMQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*6gA1iny-V1i9vOx7vueMbA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/969/1*5c37jPGq9St8KyzgsQs7Eg.png" /></figure><h3>Errors we may encounter….</h3><ol><li><strong>Error message:</strong> google.protobuf.text_format.ParseError: 156:25 : ‘unicodeescape’ codec can’t decode bytes in position 2–3: truncated \UXXXXXXXX escape<br><strong>How to fix it:</strong> change ’\’ to ’/’</li><li><strong>Error message: </strong>Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2<br><strong>How to fix it: </strong>&lt;<a href="https://stackoverflow.com/questions/47068709/your-cpu-supports-instructions-that-this-tensorflow-binary-was-not-compiled-to-u">Reference Link</a>&gt; pip install — ignore-installed –upgrade “Download URL” <br> Choices of ”Download URL”: <a href="https://pypi.org/project/tensorflow/#files">https://pypi.org/project/tensorflow/#files</a> and <a href="https://github.com/inoryy/tensorflow-optimized-wheels">https://github.com/inoryy/tensorflow-optimized-wheels</a> and <a href="https://github.com/fo40225/tensorflow-windows-wheel">https://github.com/fo40225/tensorflow-windows-wheel</a></li><li><strong>Error message: </strong>allocator (gpu_0_bfc) ran out of memory trying to allocate 186.56mib<br><strong>How to fix it: </strong>modify<strong> batch size </strong>inside<strong> </strong>config file（In this example, it is ssd_mobilenet_v1_coco.config). For example, if CPU’s ram is 8G and we set batch size equals to 24, error will show up. Therefore we have to set batch size=10.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=adfed558252d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OpenAI gpt & Math of Language Modeling]]></title>
            <link>https://medium.com/@CecileLiu/openai-gpt-math-of-language-modeling-54b3ad57a4f6?source=rss-c929596e6d0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/54b3ad57a4f6</guid>
            <category><![CDATA[probability-theory]]></category>
            <category><![CDATA[gpt]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[nlp]]></category>
            <dc:creator><![CDATA[Cecile Liu]]></dc:creator>
            <pubDate>Wed, 29 May 2019 13:31:52 GMT</pubDate>
            <atom:updated>2019-05-29T13:31:52.406Z</atom:updated>
            <content:encoded><![CDATA[<p>A good openAI gpt-2 reading site : <a href="https://towardsdatascience.com/openai-gpt-2-understanding-language-generation-through-visualization-8252f683b2f8">https://towardsdatascience.com/openai-gpt-2-understanding-language-generation-through-visualization-8252f683b2f8</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0o-0x2pxPom2xef7ilshOA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nApimGHn3zsJmxQnbsiuKg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GE6MCxayS5tIhV__9ClxRA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qisOvBu_Jjfpjo_J4idJTA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vpNODTMdksTkoEm76ULkrw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c_d5CSHOHPEkKKudmhATrQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gegtHuIIMkWDQthVo65ZEA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WZkLizLVz2u5XSEBjk54Mw.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54b3ad57a4f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>