<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>NotionNext BLOG</title>
        <link>https://difer.cn/</link>
        <description>这是一个由NotionNext生成的站点</description>
        <lastBuildDate>Mon, 15 May 2023 14:38:07 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>zh-CN</language>
        <copyright>All rights reserved 2023, Difer</copyright>
        <item>
            <title><![CDATA[2023-碎碎念-01]]></title>
            <link>https://difer.cn/article/e944fe6b-0340-46cb-9cfd-2f31eab5553e</link>
            <guid>https://difer.cn/article/e944fe6b-0340-46cb-9cfd-2f31eab5553e</guid>
            <pubDate>Sun, 29 Jan 2023 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="container" class="mx-auto undefined"><main class="notion light-mode notion-page notion-block-e944fe6b034046cb9cfd2f31eab5553e"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><blockquote class="notion-quote notion-block-c88f9eb7cfea45a0bcd1cead08cc89e1"><div>而我们 面朝大海</div><div class="notion-text notion-block-b491084e5f144a5f8223622edfc164c0">看潮涨了</div><div class="notion-text notion-block-d33b7b85043541cf8d9227afc0d907c3">潮又落</div><figure class="notion-asset-wrapper notion-asset-wrapper-embed notion-block-5a804346921c495d8ab9f1627bf3f4da"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:480px;max-width:100%;flex-direction:column;height:524px"><iframe class="notion-asset-object-fit" src="https://player.bilibili.com/player.html?aid=32576222&amp;bvid=BV1dW411U7sR&amp;cid=57386386&amp;page=1" title="iframe embed" frameBorder="0" allowfullscreen="" loading="lazy" scrolling="auto"></iframe></div></figure></blockquote><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-b956e1182a3f4e1e8b65e0892a86a94c" data-id="b956e1182a3f4e1e8b65e0892a86a94c"><span><div id="b956e1182a3f4e1e8b65e0892a86a94c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#b956e1182a3f4e1e8b65e0892a86a94c" title="起"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">起</span></span></h2><div class="notion-text notion-block-9bffab7686134376baf843b29b9042df">2023悄无声息地快溜走一个月了，旧岁也在爆竹声中被赶走了，那就让自己努力写点什么吧。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-490392414dc74e8cb1b201930d7e4109" data-id="490392414dc74e8cb1b201930d7e4109"><span><div id="490392414dc74e8cb1b201930d7e4109" class="notion-header-anchor"></div><a class="notion-hash-link" href="#490392414dc74e8cb1b201930d7e4109" title="关于学习"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">关于学习</span></span></h2><div class="notion-text notion-block-ac7cfb92b270422fb1fcd4497884bf01">感觉没什么有意思的可以拿出来写写，拿最近看到的数组中的stride来水一下吧（</div><div class="notion-text notion-block-3977684fce924c048bca3bab5e6f633f">存储一个多维矩阵时，内存中实际存储的是一个一维数组，在二维的情况下，熟知的有行主序，列主序的方式，stride就是不同于这两类的一个存储方式。</div><div class="notion-text notion-block-356c76108e0c4551b8d8b0655a2ada53">stride存储的映射方式为<div class="notion-text-children"><div class="notion-text notion-block-1586d8be946f40fead063fd690eebfd6">A[i, j] =&gt; Adata[i * A.strides[0] + j * A.strides[1]]</div></div></div><div class="notion-text notion-block-b63721850fe6488c862cb878bfd71681">以2x3的矩阵为例，stride为[3,1]时就等同于行主序，为[1,2]时就等同于列主序，当然stride的映射方式可以推广到更高维度。</div><div class="notion-text notion-block-0c406efb71bd47d39281116a4d7aaf5e">而为什么要有stride这种存储方式呢？</div><div class="notion-text notion-block-b2d499ac8e1241d38f3c76e95a776cf5">有以下几点好处;</div><ul class="notion-list notion-list-disc notion-block-a2188cb88a3544268db28f285679904e"><li>做转置时，也只需要交换stride就可以</li></ul><ul class="notion-list notion-list-disc notion-block-fe35adc502834f7e8bf064e243372a06"><li>做广播操作时，只需要插入一个值为0的stride</li></ul><ul class="notion-list notion-list-disc notion-block-81440911964e4b8087e1277c1c7912bc"><li>做数组切片时，只需要修改初始偏移量和形状就可以，<b>不需要拷贝底层数据</b></li></ul><div class="notion-text notion-block-35e574257fb447fea33b8fbe8997837a">接下来对其一一解释一下：</div><div class="notion-text notion-block-b2cda556a17c4327b1bf06df529d4e48">首先，考虑对一个矩阵，如何求出对应的stride?<div class="notion-text-children"><div class="notion-text notion-block-0586d476e381415da518258b36d2fe38">在dlsys hw3中可以看到一段代码</div><pre class="notion-code"><div class="notion-code-copy"><div class="notion-code-copy-button"><svg fill="currentColor" viewBox="0 0 16 16" width="1em" version="1.1"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg></div></div><code class="language-python">def compact_strides(shape):
        &quot;&quot;&quot; Utility function to compute compact strides &quot;&quot;&quot;
        stride = 1
        res = []
        for i in range(1, len(shape) + 1):
            res.append(stride)
            stride *= shape[-i]
        return tuple(res[::-1])</code></pre><div class="notion-text notion-block-d16949f3da7b4e26972421821cd1c1cf">如何理解呢？举一个具体的例子一个shape为(4,3,2)的矩阵，把它看作4个3*2的小矩阵放在一起，那么第0维每跨一步就是3*2=6，第1维跨一步就是2，最后一维跨一步就是1，stride即(6,2,1)</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-faed01a2f81342babfa03f2a01f97914"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Ff6b174a1-cb4f-456f-949c-77841bb15490%2FUntitled.png?table=block&amp;id=faed01a2-f813-42ba-bfa0-3f2a01f97914" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-ea90a89e4ceb48da9bd1ef8904dd3e0e">所以stride其实就是每一维跨的步长。</div></div></div><div class="notion-text notion-block-241fe16a4915432da7afd2d34190ff4c">在明白stride的本质后再看这三个问题：<div class="notion-text-children"><ul class="notion-list notion-list-disc notion-block-fd39f952a0d54d07aec8f6642ea6d92c"><li>做转置时，也只需要交换stride就可以</li><ul class="notion-list notion-list-disc notion-block-fd39f952a0d54d07aec8f6642ea6d92c"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-d325fe85d35e4a839a3b8190098b34a5"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F67086dcf-b391-44c8-abb8-4155a59f600e%2FUntitled.png?table=block&amp;id=d325fe85-d35e-4a83-9a3b-8190098b34a5" alt="notion image" loading="lazy" decoding="async"/></div></figure></ul></ul><ul class="notion-list notion-list-disc notion-block-40a70799b5f04e97b1e950e9fcb3e5c7"><li>做广播操作时，只需要插入一个值为0的stride</li><ul class="notion-list notion-list-disc notion-block-40a70799b5f04e97b1e950e9fcb3e5c7"><div class="notion-text notion-block-9cd1ca35878849459e94f40b84c5c68d">例如如果要把2×3的张量广播到2×3×4，在变换shape以后只需要把strides置为(3, 1, 0),对照上文映射关系式,即<div class="notion-text-children"><div class="notion-text notion-block-adca083f8dac4c39b6a0befae5487f60">A[i, j] =&gt; Adata[i * 2 + j * 3 + k * 0]</div></div></div><div class="notion-text notion-block-f51b80ee95b34a29bd9401973ec724ce">0不会影响在内存一维数组中索引到的值，但k为4，相当于循环索引了4次，达到广播的效果</div></ul></ul><ul class="notion-list notion-list-disc notion-block-23a546a8f47b4de292cb1f62206abf24"><li>做数组切片时，只需要修改初始偏移量和形状就可以，<b>不需要拷贝底层数据</b></li><ul class="notion-list notion-list-disc notion-block-23a546a8f47b4de292cb1f62206abf24"><div class="notion-text notion-block-e2707d389bfc49589deee96920dcced2">通过给定每一维的start,end，step,即每一维的起始位置，结束位置，子步长，即可计算出对应切分的子矩阵的strides以及shape，offset，从而得到子矩阵。</div></ul></ul></div></div><div class="notion-text notion-block-e19226ddb769480cbc8ac1249a0ca642">相关资料<div class="notion-text-children"><div class="notion-row"><a target="_blank" rel="noopener noreferrer" class="notion-bookmark notion-block-b71ef2fdb062441fa6f759feaac154bd" href="https://zhuanlan.zhihu.com/p/579885790"><div><div class="notion-bookmark-title">CMU dlsys 深度学习系统13. 硬件加速的实现</div><div class="notion-bookmark-description">本节课将利用前两节课学到的知识，快速过一下底层的具体实现，以为第三次作业打基础。C++和CUDA的底层实现文件在 src目录下，而Python的NDArray后端高层实现在 needle/backend_ndarray 下。本次作业的目的就是创造 NDArray这个加速库，替换原有的numpy实现。根目录下的 CMakeLists.txt和 Makefile 是为了构建库所需要的，有兴趣也可以查阅，但非硬性要求 对 handle 的作用可能大家会觉得比较费解，那我们来跟踪一些操作的执行过程。考虑如下代码 对第一条语句，首先我们希望在GPU上创建一个一维数组，包含三个元素。对应的，可以看一下 NDArray的__init__构造函数。首先，程序会把输入的python列表转化为一个numpy的array，然后走 elif isinstance(other, np.ndarray)的分支。在这个分支里，先会调用 self.make(other.shape, device=device这条语句，创建数据结构，然后调用具体 device的 from_numpy方法，将这个numpy的ndarray压缩到连续空间，再用压缩后的数组初始化这个 array的_handle 成员变量（实际上是一个内存拷贝） 对于 make 这个类方法，其签名为 对于CPU后端，具体实现在 src/ndarray_backend_cpu.cc中，通过 pybind 暴露。 实际上调用的是 AlignedArray 的构造函数，它会对分配一个指针并开辟指定大小的内存空间 另一种构造数组的方法是 from_numpy()（也是上面示例代码中构造的方法）。在C++后端中，实现为一个数组拷贝，从numpy数组拷贝到对应指针指向的区域（即_handle 指向的区域） 对于GPU后端，具体实现在 src/ndarray_backend_cuda.cu中， Array对应于一个 CudaArray结构体。构造函数使用 cudaMalloc根据指定元素数量分配显存， from_numpy 的实现和C++后端的实现大同小异 对于 y = x + 1，实际上是重载了 NDArray的加法运算符，定义在__add__方法中。该方法进一步调用 ewise_or_scalar，根据操作数类型（是否为</div><div class="notion-bookmark-link"><div class="notion-bookmark-link-icon"><img src="https://static.zhihu.com/heifetz/favicon.ico" alt="CMU dlsys 深度学习系统13. 硬件加速的实现" loading="lazy" decoding="async"/></div><div class="notion-bookmark-link-text">https://zhuanlan.zhihu.com/p/579885790</div></div></div><div class="notion-bookmark-image"><img style="object-fit:cover" src="https://picx.zhimg.com/v2-4d5d5a5722bc8deef8caf83c86bfeea4_l.jpg?source=172ae18b" alt="CMU dlsys 深度学习系统13. 硬件加速的实现" loading="lazy" decoding="async"/></div></a></div><div class="notion-row"><a target="_blank" rel="noopener noreferrer" class="notion-bookmark notion-block-8ca9a2e6ed104eabb13a8d5fad90a0e4" href="https://zhuanlan.zhihu.com/p/588928156"><div><div class="notion-bookmark-title">Deep Learning System-Homework 3</div><div class="notion-bookmark-description">从homework 3开始，就要自己实现一个ndarray的底层啦，其中分别涉及三种后端，Python、CPU和CUDA。建议做该homework之前，先看看陈天奇老师的代码讲解课，以便对整个代码有个初步的了解，这里就不对代码进行额外的解释了。homework 3的任务主要就是针对以上三种不同的后端分别实现一些array operation。 本质上，对array做的transformation，并不需要重新开辟内存空间，我们只需要通过改变array的stride和shape来改变上层用户索引数据的方式。这样一来，我们可以看到array的不同形式并不额外开辟内存空间。 本子任务主要通过as_strided这个函数来修改array的strides。 ### BEGIN YOUR SOLUTION if prod(self.shape) != prod(new_shape): raise RuntimeError(&quot;The product of current shape is not equal to the product of the new shape&quot;) if not self.is_compact(): raise RuntimeError(&quot;the matrix is not compact&quot;) return self.as_strided(shape=new_shape, strides=self.compact_strides(new_shape)) permute操作交换axis的数据，即交换axis对应的stride即可 dims = len(self.shape) if new_axes == tuple(range(dims)):</div><div class="notion-bookmark-link"><div class="notion-bookmark-link-icon"><img src="https://static.zhihu.com/heifetz/favicon.ico" alt="Deep Learning System-Homework 3" loading="lazy" decoding="async"/></div><div class="notion-bookmark-link-text">https://zhuanlan.zhihu.com/p/588928156</div></div></div><div class="notion-bookmark-image"><img style="object-fit:cover" src="https://picx.zhimg.com/v2-d80b706850a430685109278136e0b2e1_720w.jpg?source=172ae18b" alt="Deep Learning System-Homework 3" loading="lazy" decoding="async"/></div></a></div></div></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-e8d76206446c44a89f1d52189d670226" data-id="e8d76206446c44a89f1d52189d670226"><span><div id="e8d76206446c44a89f1d52189d670226" class="notion-header-anchor"></div><a class="notion-hash-link" href="#e8d76206446c44a89f1d52189d670226" title="关于动漫"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">关于动漫</span></span></h2><div class="notion-text notion-block-591d2d22f91443ca96c79f43ffe79066">最近把春物补完了，看着大老师的一步步变成现充的样子，我还是更喜欢他前面桀骜不驯说圣经的调调（误</div><figure class="notion-asset-wrapper notion-asset-wrapper-embed notion-block-60099d46f44143088d8fce705077c0fb"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:768px;max-width:100%;flex-direction:column;height:393px"><iframe class="notion-asset-object-fit" src="https://player.bilibili.com/player.html?aid=35131014&amp;bvid=BV1Nb411w7sk&amp;cid=61553682&amp;page=1" title="iframe embed" frameBorder="0" allowfullscreen="" loading="lazy" scrolling="auto"></iframe></div></figure><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-6882234cd4654b3ea3353cbef119422b" data-id="6882234cd4654b3ea3353cbef119422b"><span><div id="6882234cd4654b3ea3353cbef119422b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#6882234cd4654b3ea3353cbef119422b" title="关于阅读"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">关于阅读</span></span></h2><div class="notion-text notion-block-22210a4cc08a4a4bb82b1b2f57477314">最近看了《麦田里的守望者》，还没看完，emm,没怎么看懂，感觉行文挺琐碎的，没看出什么内涵，大概我没有那种时代背景带来的感受吧。</div><div class="notion-text notion-block-1d0800e741094f91b9e1f90ea812e03a">另外，机缘巧合下看了看余华的《第七天》，果然，挺惨的，这下不止活着惨，死了也挺惨的，不过今早我忽然想到，从旁观者的角度看主人公的生活确实尽是悲惨之事，但代入主人公视角进去，好像又能从悲惨的故事中发现些幸福的片段？至于作者到底想表达什么，我这个没有文学性的脑袋大抵是读不懂了，就当睡前读物吧。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-339922cac98441a4a65161d57545ad15" data-id="339922cac98441a4a65161d57545ad15"><span><div id="339922cac98441a4a65161d57545ad15" class="notion-header-anchor"></div><a class="notion-hash-link" href="#339922cac98441a4a65161d57545ad15" title="终"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">终</span></span></h2><div class="notion-text notion-block-ee916f799e574daca1577490f4b3721b">不知不觉又虚度了人生的几个小时，那就，下次见吧，ma ta ne(またね)~ </div><div class="notion-blank notion-block-75e1cbf4d35f478c80939214770b9d4d"> </div><div class="notion-blank notion-block-8bf93e7750f343188e0f5217c0078e80"> </div><div class="notion-blank notion-block-e3405cf64bd545da8f0a9e0ca4132490"> </div><div class="notion-blank notion-block-880bcefe79a74710b1e6db7b4311ffff"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[2022-碎碎念-01]]></title>
            <link>https://difer.cn/article/0cfc22f3-a355-48f1-9967-791409181d2a</link>
            <guid>https://difer.cn/article/0cfc22f3-a355-48f1-9967-791409181d2a</guid>
            <pubDate>Sun, 11 Dec 2022 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="container" class="mx-auto undefined"><main class="notion light-mode notion-page notion-block-0cfc22f3a35548f19967791409181d2a"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><blockquote class="notion-quote notion-block-2a79cbe60894443592fc74b8aff97839"><div>And you run，&#x27;Cause life is too short</div></blockquote><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-964e8b3a90834b0a8d0ed27c60c7897d" data-id="964e8b3a90834b0a8d0ed27c60c7897d"><span><div id="964e8b3a90834b0a8d0ed27c60c7897d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#964e8b3a90834b0a8d0ed27c60c7897d" title="起"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">起</span></span></h2><div class="notion-text notion-block-624491d1c13d4d489e23d8fb2903fe39">白雪又一次覆盖这个平凡的小镇，明明是个旧年未去、新年未来的时刻，但不知为什么我的脑袋突然崩出来了写博客的念头，想来惭愧，写博客这个念头自从高中毕业就一直在我心头起起伏伏，来来回回几次折腾也是搭完就抛掷脑后了，每当想要下笔，就觉得肚子里挤不出什么墨水，实在想不出什么主题可写，近几日，忽然想到要不就尝试下周报的形式，来点流水账般的碎碎念好了，ok,那就试试吧。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-94716beac87b44d592ebbfb47d6799d5" data-id="94716beac87b44d592ebbfb47d6799d5"><span><div id="94716beac87b44d592ebbfb47d6799d5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#94716beac87b44d592ebbfb47d6799d5" title="关于学习"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">关于学习</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-de8b9c7235af4707b474392b4b3e726e" data-id="de8b9c7235af4707b474392b4b3e726e"><span><div id="de8b9c7235af4707b474392b4b3e726e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#de8b9c7235af4707b474392b4b3e726e" title="Dlsys-hw2的一次debug"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Dlsys-hw2的一次debug</span></span></h3><div class="notion-text notion-block-08f47ba89a4c4bec9c63e123b3d022f4">在实现（抄写）hw2中Adam算子时，最后的计算图内存check一直过不掉，只好一步步去查是哪一个layer或者op实现过程有问题，最终定位到broadcast_to这个op算子的实现上。当前实现（抄的）方式是这样的：<div class="notion-text-children"><pre class="notion-code"><div class="notion-code-copy"><div class="notion-code-copy-button"><svg fill="currentColor" viewBox="0 0 16 16" width="1em" version="1.1"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg></div></div><code class="language-python">class BroadcastTo(TensorOp):
    def __init__(self, shape):
        self.shape = shape

    def compute(self, a):
        return array_api.broadcast_to(a, self.shape)

    def gradient(self, out_grad, node):
        ### BEGIN YOUR SOLUTION
        ipt = node.inputs[0]
        grad = out_grad
        for _ in range(len(out_grad.shape) - len(ipt.shape)):
            grad = summation(grad, axes=0)
        for i, dim in enumerate(ipt.shape):
            if dim == 1:
                grad = grad.cached_data.sum(axis=i, keepdims=True)
            grad = Tensor(grad)

        grad = reshape(grad, ipt.shape)
        return [grad]
        ### END YOUR SOLUTION</code></pre></div></div><div class="notion-text notion-block-43c1ee9ebc6d4cb7846f416ec91c5017">可以看到，在反向对grad做summation这一操作时，采用了循环多次调用summation这一算子，而每一次都会在计算图中新生成一个节点，在看到另外的大佬实现时，发现其实可以将循环缩减到一次summation的，省去多余的节点,优化后内存check就过掉啦。<div class="notion-text-children"><pre class="notion-code"><div class="notion-code-copy"><div class="notion-code-copy-button"><svg fill="currentColor" viewBox="0 0 16 16" width="1em" version="1.1"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg></div></div><code class="language-python">class BroadcastTo(TensorOp):
    def __init__(self, shape):
        self.shape = shape

    def compute(self, a):
        return array_api.broadcast_to(a, self.shape)

    def gradient(self, out_grad, node):
        ### BEGIN YOUR SOLUTION
        input_shape = node.inputs[0].shape
        input_shape_len = len(input_shape) - 1
        self.reduce_dim = []
        for idx in range(len(out_grad.shape)-1, -1, -1): 
            if input_shape_len &lt; 0: 
                self.reduce_dim.append(idx)
                continue
            broadcast_dim_size = self.shape[idx]
            input_dim_size = input_shape[input_shape_len]
            
            if broadcast_dim_size != input_dim_size: 
                self.reduce_dim.append(idx)
            input_shape_len -= 1
        return reshape(summation(out_grad, tuple(self.reduce_dim)), input_shape)
        ### END YOUR SOLUTION</code></pre></div></div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-d7b1ef40f652409cb88a4df063dd4d4f" data-id="d7b1ef40f652409cb88a4df063dd4d4f"><span><div id="d7b1ef40f652409cb88a4df063dd4d4f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#d7b1ef40f652409cb88a4df063dd4d4f" title="重新搭了一下blog"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">重新搭了一下blog</span></span></h3><div class="notion-text notion-block-57da929ac563492fa896ac53508c74b5">在去年想到能不能Notion去做blog后，我就做过一些尝试，当时notion还没有官方api，能用的框架也只有几个，虽然勉勉强强搭起来了，但后续很快出了问题也懒得维护了，最近想要重新写博客也就又去找了下，果然如今方案就十分成熟了，简单易用，在此推荐大家尝试NotionNext这个方案，只需几分钟，就可以搭个和本站一样的blog了，十分方便</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-f2cf8434e3d848e48b0e57f1768bdf5a" data-id="f2cf8434e3d848e48b0e57f1768bdf5a"><span><div id="f2cf8434e3d848e48b0e57f1768bdf5a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#f2cf8434e3d848e48b0e57f1768bdf5a" title="尝试入门TensorRT"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">尝试入门TensorRT</span></span></h3><div class="notion-text notion-block-c570be3579524ffdb0d87ca2a504cae9">目前搜了一堆视频，学习资料，但还是一片混沌中，下周有了进度后再写写</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-0f996809c6024472a0183a7e16ef1d45" data-id="0f996809c6024472a0183a7e16ef1d45"><span><div id="0f996809c6024472a0183a7e16ef1d45" class="notion-header-anchor"></div><a class="notion-hash-link" href="#0f996809c6024472a0183a7e16ef1d45" title="关于生活"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">关于生活</span></span></h2><div class="notion-text notion-block-6b2191a487fd416793cf697a2ac70ede">本周最重要的当然是，一下子从清零时代迈入共存时代了，在经历近乎一百多天的封控后，这忽如一夜春风来，属实扫去了不少阴霾，anyway，向前看吧，冬天总会过去的。</div><div class="notion-text notion-block-2e627dba7360468da56bd905f0b8a783">还有就是昨天趁着双12冲了一台3070ti的笔记本，因为 😷学校的服务器也整的我在家没法好好使用，等下周电脑到了就可以把环境放到本机，好好学习（游戏）喽~</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-40a97295da93456fb1ff71aca9bd6801" data-id="40a97295da93456fb1ff71aca9bd6801"><span><div id="40a97295da93456fb1ff71aca9bd6801" class="notion-header-anchor"></div><a class="notion-hash-link" href="#40a97295da93456fb1ff71aca9bd6801" title="终"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">终</span></span></h2><div class="notion-text notion-block-6e4b226fc48e4379b95284eb47123bf0">碎碎念大概就这些了，下周见吧（<s>可能从此又鸽了</s>），ma ta ne(またね)~ </div><hr class="notion-hr notion-block-a70484a74df6492aa8593d7ed92cf3a1"/><div class="notion-blank notion-block-25989cca9b024cdc9ccbf55dd7df84f3"> </div><div class="notion-blank notion-block-d058c97bab4746f6aff500669acc130f"> </div><div class="notion-blank notion-block-a2e630b5223a4df195cd2065494c17cb"> </div><div class="notion-blank notion-block-d7c8cf4e52f04848b3ec0b0d5e25f0e2"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[新年快乐]]></title>
            <link>https://difer.cn/article/a9b38908-eb04-4176-8130-f6efbb8de470</link>
            <guid>https://difer.cn/article/a9b38908-eb04-4176-8130-f6efbb8de470</guid>
            <pubDate>Sun, 22 Jan 2023 00:00:00 GMT</pubDate>
            <description><![CDATA[Life was like a box of chocolates.
新年快乐 🎉]]></description>
            <content:encoded><![CDATA[<div id="container" class="mx-auto undefined"><main class="notion light-mode notion-page notion-block-a9b38908eb0441768130f6efbb8de470"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-text notion-block-87164f5b68014db19c0d092e001c6aa6">一边补阿甘正传一边跨了年。</div><div class="notion-text notion-block-77bd64280e124d6dbe739d76d50b198a">Life was like a box of chocolates.</div><div class="notion-text notion-block-8683a7124cbe41b79eb55c7fb9d36bc4">新年快乐 🎉</div><figure class="notion-asset-wrapper notion-asset-wrapper-embed notion-block-0f861bbfc4cc43a48ca0d65e454edff9"><div style="position:relative;display:flex;justify-content:center;align-self:start;width:456px;max-width:100%;flex-direction:column;height:152px"><iframe class="notion-asset-object-fit" src="https://open.spotify.com/embed/track/18GiV1BaXzPVYpp9rmOg0E?utm_source=oembed" title="iframe embed" frameBorder="0" allowfullscreen="" loading="lazy" scrolling="auto"></iframe></div><figcaption class="notion-asset-caption">Blowin’ in the Wind （需外网连接）</figcaption></figure><div class="notion-blank notion-block-5be7a0726e644dadbef2a870e5f56716"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[毕业]]></title>
            <link>https://difer.cn/article/428e2d4c-268e-4e78-91da-2e6b8dbcd086</link>
            <guid>https://difer.cn/article/428e2d4c-268e-4e78-91da-2e6b8dbcd086</guid>
            <pubDate>Sat, 18 Jun 2022 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="container" class="mx-auto undefined"><main class="notion light-mode notion-page notion-block-428e2d4c268e4e7891da2e6b8dbcd086"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-text notion-block-72c69fc3d8054387a14bba7b8a38e702">夏天就要过去了，我们好像什么都没做。</div><div class="notion-text notion-block-fd5f21702d1f4092b1defb66e918aec1">是啊，就这样跑来跑去，什么都没做。</div><div class="notion-text notion-block-17b267297de4443989538f872df8b9b5">那总会留下些什么吧，</div><div class="notion-text notion-block-8eccd0f3a3f241fa97b99258bb6eda09">留下了什么，我们就会成为怎么样的大人</div><div class="notion-blank notion-block-a3f4375f32584d91ba90d68a5c5e36f1"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[关于悄咪咪偷渡菲律宾开Spotify家庭车那些事儿~]]></title>
            <link>https://difer.cn/article/菲律宾开Spotify家庭车</link>
            <guid>https://difer.cn/article/菲律宾开Spotify家庭车</guid>
            <pubDate>Sat, 07 Aug 2021 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="container" class="mx-auto undefined"><main class="notion light-mode notion-page notion-block-b8fc4b60ad1540c2937cba0f01ffa434"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-72f2ab42a1474042a6254114217178dd" data-id="72f2ab42a1474042a6254114217178dd"><span><div id="72f2ab42a1474042a6254114217178dd" class="notion-header-anchor"></div><a class="notion-hash-link" href="#72f2ab42a1474042a6254114217178dd" title="Spotify是什么?"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Spotify是什么?</span></span></h3><div class="notion-text notion-block-bc271884b8af4544abd77f2c841a8b66">国外的一个音乐流媒体,英文歌曲版权十分丰富,有良好的推荐算法,歌单不会变灰( ,网上介绍也很多,就不赘述了,有兴趣可以自行搜索看</div><div class="notion-text notion-block-8cb48e5ebced444bb0104b5be40168c6">但相对的,国内歌曲曲库并不是很全,知名的周杰伦肯定有,但一些艺人的歌曲和一些国内特有的确实不全,比如这个歌单的中文歌基本没有😆</div><div class="notion-text notion-block-ce49d29195144819b5842dd0ccf473e5">(<a target="_blank" rel="noopener noreferrer" class="notion-link" href="http://music.163.com/playlist?id=2760497497&amp;userid=381809225">http://music.163.com/playlist?id=2760497497&amp;userid=381809225</a>)</div><div class="notion-text notion-block-580db709183d4a548945c6b0adcf5d26">听欧美较多的可以考虑</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-fa823b26f92e4998b425dc6ef1b048ae" data-id="fa823b26f92e4998b425dc6ef1b048ae"><span><div id="fa823b26f92e4998b425dc6ef1b048ae" class="notion-header-anchor"></div><a class="notion-hash-link" href="#fa823b26f92e4998b425dc6ef1b048ae" title="为什么要开菲律宾的Spotify家庭车呢?"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">为什么要开菲律宾的Spotify家庭车呢?</span></span></h3><div class="notion-text notion-block-65d040d0e9134db2a7f71ddc251b0661">便宜,便宜,便宜,还是***的便宜</div><div class="notion-text notion-block-fc5e31412b78429c90800fa47dbba408">一般上别人的家庭组市价7元/月(成本其实还要便宜些)</div><div class="notion-text notion-block-0d1a8f842a76485da028e427456a89c9">当然,如果不介意只能乱序播放,其实用免费版也不错,国内自带魔法屏蔽广告( •̀ .̫ •́ )✧</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-eeb527ef13414db188a53e77377a4d67" data-id="eeb527ef13414db188a53e77377a4d67"><span><div id="eeb527ef13414db188a53e77377a4d67" class="notion-header-anchor"></div><a class="notion-hash-link" href="#eeb527ef13414db188a53e77377a4d67" title="如何自己开菲律宾的家庭组呢?"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">如何自己开菲律宾的家庭组呢?</span></span></h3><div class="notion-text notion-block-7489b4839fb542fba5a8f8ce43ae8b72"><b>需准备:</b><div class="notion-text-children"><div class="notion-text notion-block-ef98a2d6cf13440ea46d7c45f812fb7e">菲律宾Globe电话卡一张</div><div class="notion-text notion-block-c3a985e4fd1244a989113379d429ade8">菲律宾代理</div></div></div><ol start="1" class="notion-list notion-list-numbered notion-block-61e284e8c29e4d8c928882a6b9fd298d"><li>电话卡如何获得?</li><ol class="notion-list notion-list-numbered notion-block-61e284e8c29e4d8c928882a6b9fd298d"><div class="notion-text notion-block-a8c8903a024d4fc09648d6fde90c25a0">当然是万能的淘宝啦,十块钱一张还是蛮方便的</div></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-1ccd35e549a946c29f1099bb8cac709e"><li>菲律宾代理如何获得?</li><ol class="notion-list notion-list-numbered notion-block-1ccd35e549a946c29f1099bb8cac709e"><div class="notion-text notion-block-2b92c9c2796c4db1a9058908f0b15910">当然,可以购买带有菲律宾机场的梯子,不过此处给出一个免费的办法,虽然使用起来有点卡(又不是不能用.jpg)</div><li>下载 SwitchyOmega Chrome扩展</li><ol class="notion-list notion-list-numbered notion-block-329cc6217046444e93d65bfc68afa7b2"><div class="notion-row"><a target="_blank" rel="noopener noreferrer" class="notion-bookmark notion-block-e318338660784487a87df317b36156bf" href="https://chrome.google.com/webstore/detail/proxy-switchyomega/padekgcemlokbadohgkifijomclgjgif?hl=zh-CN"><div><div class="notion-bookmark-title">Proxy SwitchyOmega</div><div class="notion-bookmark-description">备用下载地址： https://github.com/FelisCatus/SwitchyOmega/releases 此扩展为 SwitchySharp 的升级版，可替代 SwitchyPlus 或 Proxy Switchy. SwitchyOmega 初次安装时会检查是否存在 SwitchySharp ，如果有的话则会自动升级设置，无须手动配置。如果您使用的是非谷歌应用商店版，或者无法自动升级，则可以手动在SwitchySharp导出设置文件后，在SwitchyOmega导入，可兼容配置。升级到SwitchyOmega后请禁用SwitchySharp。 如有任何问题，请[右键]点击图标，并在菜单中选择&quot;反馈问题&quot;，以便开发人员及时解决。 隐私政策： https://github.com/FelisCatus/SwitchyOmega/wiki/Privacy#%E4%B8%AD%E6%96%87 2.x 版本新功能： * 自动检测未加载的元素，并可通过弹出菜单一键设置使用代理。 * 支持需要用户名密码验证的代理服务器。 * 更灵活的代理配置：代理情景模式、多个自动切换模式以及多个规则列表。 * 新增多种切换条件类型，并改进原有的切换条件。 * PAC 脚本生成和切换的性能优化。 * 崭新的选项页面和下拉菜单，用户体验更佳。 * 许多错误修复以及改进。测试更充分。 特别提醒：由于Chrome限制，同一时间只能有一个扩展控制代理设置，一般来说Chrome会优先后安装的扩展。冲突中若SwitchyOmega获得了优先权，则可以切换到&quot;系统代理&quot;模式，从而把优先权归还给其他扩展，从而解决问题。如果此扩展的配置被其他代理相关、或者去广告相关的扩展覆盖，则问题无法解决，只能通过重装SwitchyOmega来提高优先权。</div><div class="notion-bookmark-link"><div class="notion-bookmark-link-icon"><img src="https://ssl.gstatic.com/chrome/webstore/images/icon_144px.png" alt="Proxy SwitchyOmega" loading="lazy" decoding="async"/></div><div class="notion-bookmark-link-text">https://chrome.google.com/webstore/detail/proxy-switchyomega/padekgcemlokbadohgkifijomclgjgif?hl=zh-CN</div></div></div><div class="notion-bookmark-image"><img style="object-fit:cover" src="https://lh3.googleusercontent.com/Ar6pRol9XdP7QSJdQPlWUngT111eg-HCjcavM7DVg3UUIuICRhvL6_v0UcIaNt3xLuBsP0_EUww2RftpnWzYgv_MFA=w128-h128-e365-rj-sc0x00ffffff" alt="Proxy SwitchyOmega" loading="lazy" decoding="async"/></div></a></div></ol><li>寻找菲律宾代理</li><ol class="notion-list notion-list-numbered notion-block-bf28bfd92d894407836618512679aed1"><div class="notion-text notion-block-cb1e35b8e13048d6afcdaac217277751"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="http://free-proxy.cz/zh/proxylist/country/PH/all/ping/all">http://free-proxy.cz/zh/proxylist/country/PH/all/ping/all</a></div><div class="notion-text notion-block-d62a6c9aae4145dc8591354f3068cc2e">在此处找几个代理填入插件使用即可,具体SwitchyOmega插件如何使用网上教程挺多的,此处就不赘述了,简而言之就是在情景模式设置出填入代理信息,如何在网页使用时切换至情景模式即可</div></ol><li>Globe电话卡如何查询余额与充值?</li><ol class="notion-list notion-list-numbered notion-block-74e1fb32a37842e8abb0f56b6810cbc6"><div class="notion-text notion-block-c4a4c0afe3934d48995a8b30bc6cfebe">去globe官网注册账号,绑定对应的电话卡即可看到自己的话费余额</div><div class="notion-text notion-block-40a822c6f99940e3a12d4e7d9eba51e5"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.globe.com.ph/">https://www.globe.com.ph/</a></div><div class="notion-text notion-block-aa67812b341e4bd38d1be56336c63dc2">如何充值菲律宾电话卡话费呢?</div><div class="notion-text notion-block-a5ca1abd979046338143b55e29da3bc1">大家各显神通吧</div><div class="notion-text notion-block-40ce637aa60c4f3c934d0a009de53f38">可以注册菲律宾的&quot;支付宝&quot;Gcash使用,不过认证需要护照</div><div class="notion-text notion-block-b7ad9e6cc70045a3865a72b871936f4b">目前某宝与各大公众号也有充值服务</div><div class="notion-text notion-block-3079516e0abc4875a6c4c066f2c305f1">个人直接用公众号冲的,相比官方汇率贵了几毛钱,还是蛮划算的</div></ol><h3 class="notion-h notion-h2 notion-block-e8ff6a84741e4a9b97032574174c9313" data-id="e8ff6a84741e4a9b97032574174c9313"><span><div id="e8ff6a84741e4a9b97032574174c9313" class="notion-header-anchor"></div><a class="notion-hash-link" href="#e8ff6a84741e4a9b97032574174c9313" title="菲区家庭组开启步骤"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">菲区家庭组开启步骤</span></span></h3><li>按上述所说设置好菲区代理,进入菲区spotify官网</li><ol class="notion-list notion-list-numbered notion-block-d02101853a32481bb3b57724e73070fc"><div class="notion-text notion-block-85071061ed494c6fb0d14ebfe8554a85"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.spotify.com/ph-en">https://www.spotify.com/ph-en</a></div></ol><li>在个人信息处修改国家为菲律宾</li><ol class="notion-list notion-list-numbered notion-block-562097088a404575ad0681c497e45e0a"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-524e8d6ee9a54a5bb776ab9719220d53"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F62a23b16-2014-47c0-8c3d-dde9f27b4151%2FUntitled.png?table=block&amp;id=524e8d6e-e9a5-4a5b-b776-ab9719220d53" alt="notion image" loading="lazy" decoding="async"/></div></figure></ol><li>去Premium页面,选择开启家庭组,方案选择第一个含globe电话卡充值的</li><ol class="notion-list notion-list-numbered notion-block-b3b02a813b664261bfe0db67f3cf57f8"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-fd81ad6ce6fb4fa594214577b5bd73ab"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:621px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F93b8ef7c-077d-448f-8ae6-82901d0b41d5%2FUntitled.png?table=block&amp;id=fd81ad6c-e6fb-4fa5-9421-4577b5bd73ab" alt="notion image" loading="lazy" decoding="async"/></div></figure><li>输入电话卡号,等待pin码(验证码)接收到手机,填入确认即可</li><ol class="notion-list notion-list-numbered notion-block-e2963a8ed7234010a42115619d2b41ff"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-9dc4f64ad7f94bd1ae38b300fbb7bc26"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fbf6bfd1a-7f9b-4b59-8f98-e188d5481f2f%2FUntitled.png?table=block&amp;id=9dc4f64a-d7f9-4bd1-ae38-b300fbb7bc26" alt="notion image" loading="lazy" decoding="async"/></div></figure></ol><h3 class="notion-h notion-h2 notion-block-69a80e8dae8548e78a440633e3d9f147" data-id="69a80e8dae8548e78a440633e3d9f147"><span><div id="69a80e8dae8548e78a440633e3d9f147" class="notion-header-anchor"></div><a class="notion-hash-link" href="#69a80e8dae8548e78a440633e3d9f147" title="Spotify使用小建议"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Spotify使用小建议</span></span></h3><div class="notion-text notion-block-50c7bd6c67d049a9ba50b2520e5ad806">众所周知,spotify的歌词服务并不完全,此处建议使用大佬的插件Lyricify</div><div class="notion-text notion-block-e2f8925c164449dabb0e65479f282135"><b>美观, 简洁, 有翻译</b></div><div class="notion-text notion-block-72337bf9d6cc421faa487ed5d4f70a43"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/WXRIW/Lyricify-App">https://github.com/WXRIW/Lyricify-App</a></div><h3 class="notion-h notion-h2 notion-block-d61e859dd3dc45ae9feca2a4b3427f02" data-id="d61e859dd3dc45ae9feca2a4b3427f02"><span><div id="d61e859dd3dc45ae9feca2a4b3427f02" class="notion-header-anchor"></div><a class="notion-hash-link" href="#d61e859dd3dc45ae9feca2a4b3427f02" title="ps:"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">ps:</span></span></h3><div class="notion-text notion-block-e11b23adaf5a488c877251b7bde668c2"><s> 不想折腾的话,可以直接加我的家庭组,目前还有几个名额</s></div><div class="notion-text notion-block-311ac590afb347bf9bcd57e9749dff8d"><s>按市价￥7/月,最好是长期用户 (。・∀・)ノ</s></div><div class="notion-text notion-block-4c2c9e2a3a314714881f51901e165f40">(已无)</div><div class="notion-text notion-block-c95399163e9c40c2bc1c20b31a021903">TG: <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://t.me/DiferIlToWorld">https://t.me/DiferIlToWorld</a></div><div class="notion-blank notion-block-41a151707bf34f4183329901da133345"> </div></ol></ol></ol></main></div>]]></content:encoded>
        </item>
    </channel>
</rss>