1<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>Blogs</title><link rel="preload" href="/profile/kirov.jpg" as="image" fetchpriority="high"/><link rel="preload" href="/icon/cv.png" as="image" fetchpriority="high"/><link rel="preload" href="/icon/google-scholar.png" as="image" fetchpriority="high"/><link rel="preload" href="/icon/hugging-face.png" as="image" fetchpriority="high"/><link rel="preload" href="/icon/github.png" as="image" fetchpriority="high"/><link rel="preload" href="/icon/link.png" as="image" fetchpriority="high"/><link rel="preload" href="/icon/rednote.png" as="image" fetchpriority="high"/><link rel="preload" href="/icon/medium.png" as="image" fetchpriority="high"/><link rel="preload" href="/icon/x.png" as="image" fetchpriority="high"/><meta name="next-head-count" content="12"/><link data-next-font="" rel="preconnect" href="/" crossorigin="anonymous"/><link rel="preload" href="/_next/static/css/772fa2ab7e9e7e47.css" as="style"/><link rel="stylesheet" href="/_next/static/css/772fa2ab7e9e7e47.css" data-n-g=""/><noscript data-n-css=""></noscript>
1<script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script>
1<script src="/_next/static/chunks/webpack-8fa1640cc84ba8fe.js" defer=""></script>
1<script src="/_next/static/chunks/framework-64ad27b21261a9ce.js" defer=""></script>
1<script src="/_next/static/chunks/main-a8d1d7f367b9d912.js" defer=""></script>
1<script src="/_next/static/chunks/pages/_app-1dd98188293f786c.js" defer=""></script>
1<script src="/_next/static/chunks/247-78406d5edc82f4ee.js" defer=""></script>
1<script src="/_next/static/chunks/94-c6758bd25a04b50e.js" defer=""></script>
1<script src="/_next/static/chunks/pages/blog-e016cadcf835234a.js" defer=""></script>
1<script src="/_next/static/lQjvM1X2RBEEsgaotyol-/_buildManifest.js" defer=""></script>
1<script src="/_next/static/lQjvM1X2RBEEsgaotyol-/_ssgManifest.js" defer=""></script>
1</head><body><div id="__next"><div class="flex flex-col md:flex-row"><div class="navigator mx-auto text-center pt-5 md:pt-20 md:pr-20 md:pl-20 md:h-screen md:sticky md:top-0"><div class="group"><div class="group font-mono text-slate-700 font-semibold text-2xl"><span class="group-hover:text-rose-700">QILONG </span>LIU</div><img alt="" fetchpriority="high" width="150" height="150" decoding="async" data-nimg="1" class="rounded-full mx-auto m-5" style="color:transparent" src="/profile/kirov.jpg"/></div><div class="flex mx-auto w-fit"><a class="p-1" href="https://liu-qilong.github.io/CV/static/cv.pdf"><img alt="" fetchpriority="high" width="25" height="25" decoding="async" data-nimg="1" style="color:transparent" src="/icon/cv.png"/></a><a class="p-1" href="https://scholar.google.com/citations?user=N2-7ArsAAAAJ&hl=en"><img alt="" fetchpriority="high" width="25" height="25" decoding="async" data-nimg="1" style="color:transparent" src="/icon/google-scholar.png"/></a><a class="p-1" href="https://github.com/liu-qilong"><img alt="" fetchpriority="high" width="25" height="25" decoding="async" data-nimg="1" style="color:transparent" src="/icon/github.png"/></a><a class="p-1" href="https://huggingface.co/liu-qilong"><img alt="" fetchpriority="high" width="25" height="25" decoding="async" data-nimg="1" style="color:transparent" src="/icon/hugging-face.png"/></a><a class="p-1" href="https://medium.com/@liu-qilong"><img alt="" fetchpriority="high" width="25" height="25" decoding="async" data-nimg="1" style="color:transparent" src="/icon/medium.png"/></a><a class="p-1" href="https://twitter.com/liu_qi_long"><img alt="" fetchpriority="high" width="25" height="25" decoding="async" data-nimg="1" style="color:transparent" src="/icon/x.png"/></a><a class="p-1" href="https://www.xiaohongshu.com/user/profile/5c5f9656000000001a0254a3"><img alt="" fetchpriority="high" width="25" height="25" decoding="async" data-nimg="1" style="color:transparent" src="/icon/rednote.png"/></a></div><a class="text-s hyphens-none" href="/[email protected]">[email protected]</a><div><div class="m-5"><a class="text-slate-800 text-lg" href="/">Home âºï¸</a></div><div class="m-5"><a class="text-slate-800 text-lg" href="/paper">Papers ð</a></div><div class="m-5"><a class="text-slate-800 text-lg" href="/blog">Blogs âï¸</a></div><div class="m-5"><a class="text-slate-800 text-lg" href="/note">Notes ð</a></div><div class="m-5"><a class="text-slate-800 text-lg" href="/project">Projects ðï¸</a></div></div></div><div class="content w-screen p-5 md:p-20 pt-0 md:pt-10"><h2>Blog<!-- -->s (<!-- -->18<!-- -->)</h2><div><div class="text-center mt-10 font-mono text-rose-700">>>2026<<</div><div class="group rounded-lg mt-6 p-6 ring-1 ring-slate-900/5 shadow-lg space-y-3 hover:bg-slate-100"><div><div class="flex flex-col md:flex-row items-center"><a class="w-full md:w-auto md:shrink-0" href="/blog/vim-tricks"><img alt="" loading="lazy" width="120" height="120" decoding="async" data-nimg="1" class="mx-auto w-[90%] h-auto md:w-[var(--post-imgsize)]" style="color:transparent;--post-imgsize:120px" src="/cover/blog/vim-tricks.png"/></a><div class="md:ml-2 basis-4/5"><a href="/blog/vim-tricks"><div class="text-sm md:text-base mb-1">Vim tricks</div><div class="text-xs text-slate-700">2026-08-28</div></a><div class="flex mt-1"></div></div></div><a href="/blog/vim-tricks"><hr class="mt-2 mb-2 text-slate-700"/><p class="text-xs md:text-sm text-slate-700 line-clamp-5"> Vim tricks Vim Install bash sudo apt install vim Basic operations Getting started with Vim The basics Opensource.com Give Me 20 Minutes and I ll Make You a Vim Motions Expert YouTube bash vim file Modes esc normal mode P.S. All pure character command should be used in normal mode in insert mode, the characters will be inserted, obviously i insert before a append after insert mode P.S. In command mode, use tab to select the suggestions r replace one character R write over replace mode Navigation hjkl All of these accept a count prefix, so 3j jumps down 3 lines at once Word level All of these accept a count prefix, so 3b jumps back 3 words at once w start of next word W start of next consecutive non blank word e end of current next word...</p></a></div></div></div><div><div class="text-center mt-10 font-mono text-rose-700">>>2025<<</div><div class="group rounded-lg mt-6 p-6 ring-1 ring-slate-900/5 shadow-lg space-y-3 hover:bg-slate-100"><div><div class="flex flex-col md:flex-row items-center"><a class="w-full md:w-auto md:shrink-0" href="/blog/python-tricks"><img alt="" loading="lazy" width="120" height="120" decoding="async" data-nimg="1" class="mx-auto w-[90%] h-auto md:w-[var(--post-imgsize)]" style="color:transparent;--post-imgsize:120px" src="/cover/blog/python-tricks.png"/></a><div class="md:ml-2 basis-4/5"><a href="/blog/python-tricks"><div class="text-sm md:text-base mb-1">Python tricks</div><div class="text-xs text-slate-700">2025-05-18</div></a><div class="flex mt-1"></div></div></div><a href="/blog/python-tricks"><hr class="mt-2 mb-2 text-slate-700"/><p class="text-xs md:text-sm text-slate-700 line-clamp-5"> Python tricks Core features Decoration function python def decorator func original func def wrapper func args, kwargs do something before result original func args, kwargs do something after return result return wrapper func decorator func def target func ... ... Loop Loop through a dictionary with it key value python for it, key, value in dict ... Loop through combinatons of lists python from itertools import product for i, j in product ls 1, ls 2 ... Scripting Command line arguments Example python import argparse parser argparse.ArgumentParser description Description of your script parser.add argument mesh dir , type str, required True, help Path to the mesh directory parser.add argument output , action store true , help Whether to save the output args parser.parse args args.mesh dir Access the mesh directory...</p></a></div></div></div><div><div class="group rounded-lg mt-6 p-6 ring-1 ring-slate-900/5 shadow-lg space-y-3 hover:bg-slate-100"><div><div class="flex flex-col md:flex-row items-center"><a class="w-full md:w-auto md:shrink-0" href="/blog/ubuntu-dev-env"><img alt="" loading="lazy" width="120" height="120" decoding="async" data-nimg="1" class="mx-auto w-[90%] h-auto md:w-[var(--post-imgsize)]" style="color:transparent;--post-imgsize:120px" src="/cover/blog/ubuntu-dev-env.png"/></a><div class="md:ml-2 basis-4/5"><a href="/blog/ubuntu-dev-env"><div class="text-sm md:text-base mb-1">Deep learning environment setup</div><div class="text-xs text-slate-700">2025-04-22</div></a><div class="flex mt-1"></div></div></div><a href="/blog/ubuntu-dev-env"><hr class="mt-2 mb-2 text-slate-700"/><p class="text-xs md:text-sm text-slate-700 line-clamp-5"> Deep learning environment setup Install Ubuntu 22.04 LTS Install Ubuntu Desktop Ubuntu Ubuntu Releases Select the right version of Ubuntu is important. Softwares for deep learning like CUDA and NCCL provide specific compiles for different Ubuntu versions not all Ubuntu versions are available. In 2025, Ubuntu 22.04 and Ubuntu 20.04 are the safe choices. After install the OS, full upgrade of kernel packages must be done. Otherwise, newly added packages could clash. bash sudo apt update sudo apt full upgrade yes sudo apt autoremove yes sudo apt autoclean yes reboot Zsh shell Install bash sudo apt update sudo apt install y zsh set as default shell chsh s which zsh Plugins Install Zinit to add zsh with lightweight plugins bash bash c curl fail show error silent location https raw.githubusercontent.com zdh...</p></a></div></div></div><div><div class="text-center mt-10 font-mono text-rose-700">>>2024<<</div><div class="group rounded-lg mt-6 p-6 ring-1 ring-slate-900/5 shadow-lg space-y-3 hover:bg-slate-100"><div><div class="flex flex-col md:flex-row items-center"><a class="w-full md:w-auto md:shrink-0" href="/blog/good-reads-of-2024"><img alt="" loading="lazy" width="120" height="120" decoding="async" data-nimg="1" class="mx-auto w-[90%] h-auto md:w-[var(--post-imgsize)]" style="color:transparent;--post-imgsize:120px" src="/cover/blog/good-reads-of-2024.jpeg"/></a><div class="md:ml-2 basis-4/5"><a href="/blog/good-reads-of-2024"><div class="text-sm md:text-base mb-1">Good reads of 2024</div><div class="text-xs text-slate-700">2024-12-31</div></a><div class="flex mt-1"><a class="" href="https://x.com/liu_qi_long/status/1879795649522413632"><img alt="" fetchpriority="high" width="20" height="20" decoding="async" data-nimg="1" style="color:transparent" src="/icon/x.png"/></a><a class="" href="https://www.xiaohongshu.com/explore/6773b7ec000000000900fe40?xsec_token=ABQaEr8Mh7g0-Ezhvs0VqOJOEIzXxdKBa0aq5GsNColxc=&
1xsec_source=pc_user"><img alt="" fetchpriority="high" width="20" height="20" decoding="async" data-nimg="1" style="color:transparent" src="/icon/rednote.png"/></a></div></div></div><a href="/blog/good-reads-of-2024"><hr class="mt-2 mb-2 text-slate-700"/><p class="text-xs md:text-sm text-slate-700 line-clamp-5"> Good reads of 2024 Finally achieved the goal of reading 12 books in 2024 Having finished these books, I don t feel particularly different. Every day in life is still the same as always. But perhaps my perception of life has become sharper than before. If the length of life cannot easily be extended through personal effort, then perhaps maintaining sensitivity in perception is equivalent to broadening the width of life. img Following are my favorite books , movies , podcasts , and articles of this year. I hope that in 2025, I can also strive to remain spiritually free. Favorite Book of 2024 Hayek s The Road to Serfdom was the most challenging book I read this year, so much so that I still haven t finished organizing my notes its sentences feel as if they are engraved on stone tablets, impossible to rewrite or condense, only to be quoted. Looking back, the book speaks of nothing more than common sense, but holding on to common se...</p></a></div></div></div><div><div class="group rounded-lg mt-6 p-6 ring-1 ring-slate-900/5 shadow-lg space-y-3 hover:bg-slate-100"><div><div class="flex flex-col md:flex-row items-center"><a class="w-full md:w-auto md:shrink-0" href="/blog/git-frequent-operations"><img alt="" loading="lazy" width="120" height="120" decoding="async" data-nimg="1" class="mx-auto w-[90%] h-auto md:w-[var(--post-imgsize)]" style="color:transparent;--post-imgsize:120px" src="/cover/blog/git-frequent-operations.png"/></a><div class="md:ml-2 basis-4/5"><a href="/blog/git-frequent-operations"><div class="text-sm md:text-base mb-1">Git frequent operations</div><div class="text-xs text-slate-700">2024-12-26</div></a><div class="flex mt-1"><a class="" href="https://x.com/liu_qi_long/status/1872581308846952651"><img alt="" fetchpriority="high" width="20" height="20" decoding="async" data-nimg="1" style="color:transparent" src="/icon/x.png"/></a></div></div></div><a href="/blog/git-frequent-operations"><hr class="mt-2 mb-2 text-slate-700"/><p class="text-xs md:text-sm text-slate-700 line-clamp-5"> Git frequent operations Basic configurations User name bash git config global user.name Your Name Email bash git config global user.email email example.com Main branch name bash git config global init.defaultBranch name List all configurations bash git config list P.S. Change main branch name of an existed repository bash git branch m old name new name If it has been pushed to remote bash git push remote delete old name git push u remote new name Local repository operations Initialize the repository bash git init Current branch operations Discard changes bash git restore file Discard all files changes bash git restore . Stage changes bash git add file P.S. Use f to force stage a file even if it s set to be ignored in .gitignore . Unstage the file changes bash git restore staged file P.S. Unstage...</p></a></div></div></div><div><div class="group rounded-lg mt-6 p-6 ring-1 ring-slate-900/5 shadow-lg space-y-3 hover:bg-slate-100"><div><div class="flex flex-col md:flex-row items-center"><a class="w-full md:w-auto md:shrink-0" href="/blog/travel-time-analysis"><img alt="" loading="lazy" width="120" height="120" decoding="async" data-nimg="1" class="mx-auto w-[90%] h-auto md:w-[var(--post-imgsize)]" style="color:transparent;--post-imgsize:120px" src="/cover/blog/travel-time-analysis.png"/></a><div class="md:ml-2 basis-4/5"><a href="/blog/travel-time-analysis"><div class="text-sm md:text-base mb-1">Travel time analysis with Apple Shortcut</div><div class="text-xs text-slate-700">2024-10-10</div></a><div class="flex mt-1"><a class="" href="https://github.com/liu-qilong/scripts/blob/main/notebook/travel-time-analysis/analysis.ipynb"><img alt="" fetchpriority="high" width="20" height="20" decoding="async" data-nimg="1" style="color:transparent" src="/icon/github.png"/></a><a class="" href="https://www.icloud.com/shortcuts/818e538f2b2c45b6804d73515557a54e"><img alt="" fetchpriority="high" width="20" height="20" decoding="async" data-nimg="1" style="color:transparent" src="/icon/link.png"/></a><a class="" href="https://medium.com/@liu-qilong/travel-time-analysis-with-apple-shortcut-bb49a596f2b0"><img alt="" fetchpriority="high" width="20" height="20" decoding="async" data-nimg="1" style="color:transparent" src="/icon/medium.png"/></a><a class="" href="https://x.com/liu_qi_long/status/1846447008141529131"><img alt="" fetchpriority="high" width="20" height="20" decoding="async" data-nimg="1" style="color:transparent" src="/icon/x.png"/></a><a class="" href="https://www.xiaohongshu.com/explore/67079f43000000002c02e597?xsec_token=ABYDZe8Ohp1TX7N4mMg5ARhUGqlxf6qd52QXBI6bRW2Fw=&
1xsec_source=pc_user"><img alt="" fetchpriority="high" width="20" height="20" decoding="async" data-nimg="1" style="color:transparent" src="/icon/rednote.png"/></a></div></div></div><a href="/blog/travel-time-analysis"><hr class="mt-2 mb-2 text-slate-700"/><p class="text-xs md:text-sm text-slate-700 line-clamp-5"> Travel time analysis with Apple Shortcut Motivation Travel during public holidays in China is a headache inducing activity, especially during national day holidays, one of the longest public holidays. People tend to pour out to visit their family friends or travel to long expecting tour sites. Traffic could be overwhelmingly heavy during this period. To deal with this situation, some schedule their travel time carefully. Long before the off duty time of 31 Sep, the day before the holiday begins, people check their map apps anxiously again and again to get a glimpse of the development of traffic jams. Experiences of the best time for departure spread on social media, though they tend to convey conflicting speculations. I got on the road at 7 30 on 1 Oct, hoping an earlier departure could make my journey easier, yet I got stuck on the road for around 10 hours, which was around 3x the ordinary travel time. P.S. I later realized that I almost chose the worst time to go... P.S...</p></a></div></div></div><div><div class="group rounded-lg mt-6 p-6 ring-1 ring-slate-900/5 shadow-lg space-y-3 hover:bg-slate-100"><div><div class="flex flex-col md:flex-row items-center"><a class="w-full md:w-auto md:shrink-0" href="/blog/cal-newport-time-management"><img alt="" loading="lazy" width="120" height="120" decoding="async" data-nimg="1" class="mx-auto w-[90%] h-auto md:w-[var(--post-imgsize)]" style="color:transparent;--post-imgsize:120px" src="/cover/blog/cal-newport-time-management.png"/></a><div class="md:ml-2 basis-4/5"><a href="/blog/cal-newport-time-management"><div class="text-sm md:text-base mb-1">Cal Newport's time management system</div><div class="text-xs text-slate-700">2024-04-15</div></a><div class="flex mt-1"><a class="" href="https://x.com/liu_qi_long/status/1846449294993510436"><img alt="" fetchpriority="high" width="20" height="20" decoding="async" data-nimg="1" style="color:transparent" src="/icon/x.png"/></a></div></div></div><a href="/blog/cal-newport-time-management"><hr class="mt-2 mb-2 text-slate-700"/><p class="text-xs md:text-sm text-slate-700 line-clamp-5"> Cal Newport s time management system Cal Newport s time management system is summarized in The Time Block Planner Cal Newport. Combining the techniques discussed in this tiny pamphlet and his other books podcasts, I compiled this blog post. Core value of time management Cal Newport advocates his time management system in his books and youtube channel. It s both time efficient, lightweight, and deliver the most important values of any time management system Time management frees your mental stress on remembering all the todos dues bouncing around your head. Time management has you articulately think about how can you complete your tasks in time. By doing this, you will soon realize that the task is more complicated than your expectation and you don t have so many allocable time, which boost motivation. e.g. Think about PhD application ...</p></a></div></div></div><div><div class="group rounded-lg mt-6 p-6 ring-1 ring-slate-900/5 shadow-lg space-y-3 hover:bg-slate-100"><div><div class="flex flex-col md:flex-row items-center"><a class="w-full md:w-auto md:shrink-0" href="/blog/latexdiff-best-practice"><img alt="" loading="lazy" width="120" height="120" decoding="async" data-nimg="1" class="mx-auto w-[90%] h-auto md:w-[var(--post-imgsize)]" style="color:transparent;--post-imgsize:120px" src="/cover/blog/latexdiff-best-practice.png"/></a><div class="md:ml-2 basis-4/5"><a href="/blog/latexdiff-best-practice"><div class="text-sm md:text-base mb-1">latexdiff: mark changes of LaTeX documents</div><div class="text-xs text-slate-700">2024-03-23</div></a><div class="flex mt-1"><a class="" href="https://medium.com/@liu-qilong/best-practices-for-marking-changes-of-latex-documents-45451db41bb7"><img alt="" fetchpriority="high" width="20" height="20" decoding="async" data-nimg="1" style="color:transparent" src="/icon/medium.png"/></a><a class="" href="https://x.com/liu_qi_long/status/1846449869051064390"><img alt="" fetchpriority="high" width="20" height="20" decoding="async" data-nimg="1" style="color:transparent" src="/icon/x.png"/></a></div></div></div><a href="/blog/latexdiff-best-practice"><hr class="mt-2 mb-2 text-slate-700"/><p class="text-xs md:text-sm text-slate-700 line-clamp-5"> latexdiff mark changes of LaTeX documents When submitting academic manuscript, it s usually mandatory to submit the marked changes for revisions resubmissions. Word is particularly handy in this regard. But if your manuscript is consists of lots math formula, e.g. in the field of deep learning, LaTeX is a more common choice. In this case, latexdiff is the go to choice for generating the document with marked changes. Install latexdiff Follow the instruction on the official documentation GitHub ftilmann latexdiff Compares two latex files and marks up significant differences between them. Releases on www.ctan.org and mirrors Prepare files Copy the whole folder of the two versions of LaTeX documents that are being compared, say one is draft 0 while the other is draft 2 . Make sure that each of them can be successfully compiled. About the figures and other resources If you stored figures in the other folder, y...</p></a></div></div></div><div><div class="group rounded-lg mt-6 p-6 ring-1 ring-slate-900/5 shadow-lg space-y-3 hover:bg-slate-100"><div><div class="flex flex-col md:flex-row items-center"><a class="w-full md:w-auto md:shrink-0" href="/blog/set-conv-padding"><img alt="" loading="lazy" width="120" height="120" decoding="async" data-nimg="1" class="mx-auto w-[90%] h-auto md:w-[var(--post-imgsize)]" style="color:transparent;--post-imgsize:120px" src="/cover/blog/set-conv-padding.gif"/></a><div class="md:ml-2 basis-4/5"><a href="/blog/set-conv-padding"><div class="text-sm md:text-base mb-1">How to set the padding of convolution to make the stride acting as a scale factor<
1/div><div class="text-xs text-slate-700">2024-03-13</div></a><div class="flex mt-1"><a class="" href="https://x.com/liu_qi_long/status/1846821014564667636"><img alt="" fetchpriority="high" width="20" height="20" decoding="async" data-nimg="1" style="color:transparent" src="/icon/x.png"/></a></div></div></div><a href="/blog/set-conv-padding"><hr class="mt-2 mb-2 text-slate-700"/><p class="text-xs md:text-sm text-slate-700 line-clamp-5"> How to set the padding of convolution to make the stride acting as a scale factor img Cover image source A guide to convolution arithmetic for deep learning Vincent Dumoulin, Francesco Visin ArXiv When doing convolution, the kernel is shift around the input image. Let s consider the case when the kernel moves left to right. The up to down scenario are just the same. Constrains Let s denote the padding size as p , the image width as w , the kernel size as k , and the stride as s . Then the total length of image width plus padding should be 2p w At the begging, the kernel is placed on the left of this total length, and is then moved towards right side with step length of s , until no more space is available. Denotes the number of the placable potions as n , then the output width of the convolution is also n . It should satisfys 2p w s k n 1 s leq 2p w a When will the ...</p></a></div></div></div><div><div class="group rounded-lg mt-6 p-6 ring-1 ring-slate-900/5 shadow-lg space-y-3 hover:bg-slate-100"><div><div class="flex flex-col md:flex-row items-center"><a class="w-full md:w-auto md:shrink-0" href="/blog/how-trans-conv-work"><img alt="" loading="lazy" width="120" height="120" decoding="async" data-nimg="1" class="mx-auto w-[90%] h-auto md:w-[var(--post-imgsize)]" style="color:transparent;--post-imgsize:120px" src="/cover/blog/how-trans-conv-work.gif"/></a><div class="md:ml-2 basis-4/5"><a href="/blog/how-trans-conv-work"><div class="text-sm md:text-base mb-1">Why transposed convolution can be used to reconstruct activating features from the input images</div><div class="text-xs text-slate-700">2024-03-13</div></a><div class="flex mt-1"><a class="" href="https://x.com/liu_qi_long/status/1846821235948400889"><img alt="" fetchpriority="high" width="20" height="20" decoding="async" data-nimg="1" style="color:transparent" src="/icon/x.png"/></a></div></div></div><a href="/blog/how-trans-conv-work"><hr class="mt-2 mb-2 text-slate-700"/><p class="text-xs md:text-sm text-slate-700 line-clamp-5"> Why transposed convolution can be used to reconstruct activating features from the input images Cover image source A guide to convolution arithmetic for deep learning Vincent Dumoulin, Francesco Visin ArXiv In ZF Net, the transposed convolution is used to approximate the inverse of convolution, leading to the reconstruction of the activating features from the input image that activates a particular layer. However, strictly speaking, the transposed convolution is not really the inverse of convolution. Then why can it be used to do the reconstruction What is transposed convolution An ordinary convolution can be written in the form of Y C X . Then the corresponding transposed convolution is defined as X C T Y What yields the largest response The convolution Y C X and be transformed to the vectorized form y i c i T x where x is...</p></a></div></div></div><div><div class="text-center mt-10 font-mono text-rose-700">>>2023<<</div><div class="group rounded-lg mt-6 p-6 ring-1 ring-slate-900/5 shadow-lg space-y-3 hover:bg-slate-100"><div><div class="flex flex-col md:flex-row items-center"><a class="w-full md:w-auto md:shrink-0" href="/blog/wsl-dev-env"><img alt="" loading="lazy" width="120" height="120" decoding="async" data-nimg="1" class="mx-auto w-[90%] h-auto md:w-[var(--post-imgsize)]" style="color:transparent;--post-imgsize:120px" src="/cover/blog/wsl-dev-env.png"/></a><div class="md:ml-2 basis-4/5"><a href="/blog/wsl-dev-env"><div class="text-sm md:text-base mb-1">A complete guide to setup WSL (Windows Subsystem for Linux)</div><div class="text-xs text-slate-700">2023-11-02</div></a><div class="flex mt-1"><a class="" href="https://medium.com/@liu-qilong/a-complete-guide-to-setup-wsl-windows-subsystem-for-linux-4547e88b6cdb"><img alt="" fetchpriority="high" width="20" height="20" decoding="async" data-nimg="1" style="color:transparent" src="/icon/medium.png"/></a><a class="" href="https://x.com/liu_qi_long/status/1846450474117169238"><img alt="" fetchpriority="high" width="20" height="20" decoding="async" data-nimg="1" style="color:transparent" src="/icon/x.png"/></a></div></div></div><a href="/blog/wsl-dev-env"><hr class="mt-2 mb-2 text-slate-700"/><p class="text-xs md:text-sm text-slate-700 line-clamp-5"> A complete guide to setup WSL Windows Subsystem for Linux WSL Windows Subsystem for Linux has various great advantages against dual boot installing Linux and Windows on the same computer , among them the most significant is that you can literally running both systems at the same time without the need to stop every software that s running and reboot to another system. Procedure to set up a WSL is roughly the same as setting up a real Linux OS, therefore this guide can also be used as a reference to Linux setup. The specifications of W
1SL setup procedure are mainly in Install WSL , CUDA and PyTorch , VTK with PyVista, and Remote development with SSH as described below. Install WSL Install WSL Microsoft Learn In PowerShell, run wsl install After restart the computer, the terminal will prompt you to set the user name and password for the WSL. Then you can then enter the linux subsystem by enter ws...</p></a></div></div></div><div><div class="group rounded-lg mt-6 p-6 ring-1 ring-slate-900/5 shadow-lg space-y-3 hover:bg-slate-100"><div><div class="flex flex-col md:flex-row items-center"><a class="w-full md:w-auto md:shrink-0" href="/blog/win-ssh-host"><img alt="" loading="lazy" width="120" height="120" decoding="async" data-nimg="1" class="mx-auto w-[90%] h-auto md:w-[var(--post-imgsize)]" style="color:transparent;--post-imgsize:120px" src="/cover/blog/win-ssh-host.png"/></a><div class="md:ml-2 basis-4/5"><a href="/blog/win-ssh-host"><div class="text-sm md:text-base mb-1">Setup Windows machine as SSH host</div><div class="text-xs text-slate-700">2023-06-08</div></a><div class="flex mt-1"><a class="" href="https://medium.com/@liu-qilong/setup-windows-machine-as-ssh-host-75627200fb46"><img alt="" fetchpriority="high" width="20" height="20" decoding="async" data-nimg="1" style="color:transparent" src="/icon/medium.png"/></a><a class="" href="https://x.com/liu_qi_long/status/1846821529197433043"><img alt="" fetchpriority="high" width="20" height="20" decoding="async" data-nimg="1" style="color:transparent" src="/icon/x.png"/></a></div></div></div><a href="/blog/win-ssh-host"><hr class="mt-2 mb-2 text-slate-700"/><p class="text-xs md:text-sm text-slate-700 line-clamp-5"> Setup Windows machine as SSH host In the previous blog post, I set up the development environment on a Windows machine. I further set it up as a ssh server that can be access by my laptop over the internet. Following is the summarization of some critical steps and relevant materials. Setup SSH host Install OpenSSH Get started with OpenSSH for Windows Microsoft Learn Check installation status of OpenSSH Get WindowsCapability Online Where Object Name like OpenSSH Install the OpenSSH Client Add WindowsCapability Online Name OpenSSH.Client 0.0.1.0 Install the OpenSSH Server Add WindowsCapability Online Name OpenSSH.Server 0.0.1.0 Set PowerShell as the default shell the shell you enter when ssh into this host New ItemProperty Path HKLM SOFTWARE OpenSSH Name DefaultShell Value ...</p></a></div></div></div><div><div class="group rounded-lg mt-6 p-6 ring-1 ring-slate-900/5 shadow-lg space-y-3 hover:bg-slate-100"><div><div class="flex flex-col md:flex-row items-center"><a class="w-full md:w-auto md:shrink-0" href="/blog/win-dev-env"><img alt="" loading="lazy" width="120" height="120" decoding="async" data-nimg="1" class="mx-auto w-[90%] h-auto md:w-[var(--post-imgsize)]" style="color:transparent;--post-imgsize:120px" src="/cover/blog/win-dev-env.png"/></a><div class="md:ml-2 basis-4/5"><a href="/blog/win-dev-env"><div class="text-sm md:text-base mb-1">Setup Windows development environment</div><div class="text-xs text-slate-700">2023-06-08</div></a><div class="flex mt-1"><a class="" href="https://medium.com/@liu-qilong/setup-windows-development-environment-db5b4cf3dfec"><img alt="" fetchpriority="high" width="20" height="20" decoding="async" data-nimg="1" style="color:transparent" src="/icon/medium.png"/></a><a class="" href="https://x.com/liu_qi_long/status/1846450726555521248"><img alt="" fetchpriority="high" width="20" height="20" decoding="async" data-nimg="1" style="color:transparent" src="/icon/x.png"/></a></div></div></div><a href="/blog/win-dev-env"><hr class="mt-2 mb-2 text-slate-700"/><p class="text-xs md:text-sm text-slate-700 line-clamp-5"> Setup Windows development environment Recently, I tried to set up a Windows machine for development, focusing on Python, machine learning PyTorch with CUDA , and web development Node.js with NPM . Following is the summarization of some critical steps and relevant materials. Later, I further set it up as a ssh server that can be accessed by my laptop over the internet. If you are interested, please check this post. PowerShell In Windows, PowerShell is more powerful than the legacy cmd shell in terms of system administration, configuration management, and perform administrative tasks. Terminal execution policy Firstly, enter PowerShell in administrator mode and modify the execution policy to enable shell scripting Set ExecutionPolicy Scope CurrentUser ExecutionPolicy Unrestricted Powershell autocomplete Fish like Autosuggestion in Powershell DEV Community...</p></a></div></div></div><div><div class="group rounded-lg mt-6 p-6 ring-1 ring-slate-900/5 shadow-lg space-y-3 hover:bg-slate-100"><div><div class="flex flex-col md:flex-row items-center"><a class="w-full md:w-auto md:shrink-0" href="/blog/latex-frequent-snippets"><img alt="" loading="lazy" width="120" height="120" decoding="async" data-nimg="1" class="mx-auto w-[90%] h-auto md:w-[var(--post-imgsize)]" style="color:transparent;--post-imgsize:120px" src="/cover/blog/latex-frequent-snippets.png"/></a><div class="md:ml-2 basis-4/5"><a href="/blog/latex-frequent-snippets"><div class="text-sm md:text-base mb-1">LaTeX frequent snippets</div><div class="text-xs text-slate-700">2023-05-23</div></a><div class="flex mt-1"><a class="" href="https://x.com/liu_qi_long/status/1872581509066145833"><img alt="" fetchpriority="high" width="20" height="20" decoding="async" data-nimg="1" style="color:transparent" src="/icon/x.png"/></a></div></div></div><a href="/blog/latex-frequent-snippets"><hr class="mt-2 mb-2 text-slate-700"/><p class="text-xs md:text-sm text-slate-700 line-clamp-5"> LaTeX frequent snippets Basic elements Section numbering Alphabetical numbering latex renewcommand thesection Alph section setcounter section 0 reset counter to start from A Math Matrix latex begin bmatrix x 11 x 12 x 13 dots x 1n x 21 x 22 x 23 dots x 2n x d1 x d2 x d3 dots x dn end bmatrix Matrix bolding mathbf Transpose top hat x, tilde x, overline x hat x, tilde x, overline x Argmin with centered subscript latex underset Theta p, Theta s, Theta a operatorname argmin Additional symbols List of LaTeX mathematical symbols OeisWiki Listing latex begin itemize item end itemize latex begin enumerate item end enumerate Algorithm latex usepackage algorithm usepackage algpseudocode ...</p></a></div></div></div><div><div class="group rounded-lg mt-6 p-6 ring-1 ring-slate-900/5 shadow-lg space-y-3 hover:bg-slate-100"><div><div class="flex flex-col md:flex-row items-center"><a class="w-full md:w-auto md:shrink-0" href="/blog/conda-frequent-commands"><img alt="" loading="lazy" width="120" height="120" decoding="async" data-nimg="1" class="mx-auto w-[90%] h-auto md:w-[var(--post-imgsize)]" style="color:transparent;--post-imgsize:120px" src="/cover/blog/conda-frequent-commands.png"/></a><div class="md:ml-2 basis-4/5"><a href="/blog/conda-frequent-commands"><div class="text-sm md:text-base mb-1">Conda frequent commands</div><div class="text-xs text-slate-700">2023-03-08</div></a><div class="flex mt-1"><a class="" href="https://x.com/liu_qi_long/status/1846821855820415479"><img alt="" fetchpriority="high" width="20" height="20" decoding="async" data-nimg="1" style="color:transparent" src="/icon/x.png"/></a></div></div></div><a href="/blog/conda-frequent-commands"><hr class="mt-2 mb-2 text-slate-700"/><p class="text-xs md:text-sm text-slate-700 line-clamp-5"> Conda frequent commands When working on a Python project, it s considered good practice to create a virtual environment. In this case, every project is running in a separate environment, with their own dependencies. This can save you tons of headache if you install all your projects dependencies in one place, things may quickly crash with each other. I personally learned this lesson the hard
1way after spending an entire night trying to fix version crashes. Eventually, I had no choice but to delete everything and start from scratch. You certainly do not want to experience the same frustration as me and you don t have to. With conda virtual environment, all your projects have their own territory to play and there is zero chance for crashing with each other. To gain a proper understanding of conda , the following resources will be helpful. Additionally, some commonly used commands will be extracted and listed in this blog post for easy reference. Managing conda Con...</p></a></div></div></div><div><div class="text-center mt-10 font-mono text-rose-700">>>2022<<</div><div class="group rounded-lg mt-6 p-6 ring-1 ring-slate-900/5 shadow-lg space-y-3 hover:bg-slate-100"><div><div class="flex flex-col md:flex-row items-center"><a class="w-full md:w-auto md:shrink-0" href="/blog/sphinx-rtd-my-optimized-documentation-workflow"><img alt="" loading="lazy" width="120" height="120" decoding="async" data-nimg="1" class="mx-auto w-[90%] h-auto md:w-[var(--post-imgsize)]" style="color:transparent;--post-imgsize:120px" src="/cover/blog/sphinx-rtd-my-optimized-documentation-workflow.png"/></a><div class="md:ml-2 basis-4/5"><a href="/blog/sphinx-rtd-my-optimized-documentation-workflow"><div class="text-sm md:text-base mb-1">Sphinx + ReadTheDocs: My optimized documentation workflow</div><div class="text-xs text-slate-700">2022-11-18</div></a><div class="flex mt-1"><a class="" href="https://medium.com/@liu-qilong/sphinx-readthedocs-my-optimized-documentation-workflow-169308270e99"><img alt="" fetchpriority="high" width="20" height="20" decoding="async" data-nimg="1" style="color:transparent" src="/icon/medium.png"/></a><a class="" href="https://x.com/liu_qi_long/status/1846822181810082106"><img alt="" fetchpriority="high" width="20" height="20" decoding="async" data-nimg="1" style="color:transparent" src="/icon/x.png"/></a></div></div></div><a href="/blog/sphinx-rtd-my-optimized-documentation-workflow"><hr class="mt-2 mb-2 text-slate-700"/><p class="text-xs md:text-sm text-slate-700 line-clamp-5"> Sphinx ReadTheDocs My optimized documentation workflow Sphinx is an excellent tool for documenting Python projects. It can generate comprehensive documentation from docstrings in the code, which means that the comments you write for your code also serve as its documentation. If you are not familiar with writing docstrings or Sphinx documentation, I highly recommend checking out this tutorial A How to Guide for Sphinx ReadTheDocs sglvladi My workflow was adapted from this tutorial with some personalization. Here is an example example Folder structure and setup Under the root folder of the project, there are docs for storing documentation, projectna...</p></a></div></div></div><div><div class="group rounded-lg mt-6 p-6 ring-1 ring-slate-900/5 shadow-lg space-y-3 hover:bg-slate-100"><div><div class="flex flex-col md:flex-row items-center"><a class="w-full md:w-auto md:shrink-0" href="/blog/embed-gif-in-latex-beamer"><img alt="" loading="lazy" width="120" height="120" decoding="async" data-nimg="1" class="mx-auto w-[90%] h-auto md:w-[var(--post-imgsize)]" style="color:transparent;--post-imgsize:120px" src="/cover/blog/embed-gif-in-latex-beamer.png"/></a><div class="md:ml-2 basis-4/5"><a href="/blog/embed-gif-in-latex-beamer"><div class="text-sm md:text-base mb-1">Embed GIF and MP4 in LaTeX Beamer</div><div class="text-xs text-slate-700">2022-06-20</div></a><div class="flex mt-1"><a class="" href="https://medium.com/@liu-qilong/embed-gif-in-latex-beamer-ed5ced8c041"><img alt="" fetchpriority="high" width="20" height="20" decoding="async" data-nimg="1" style="color:transparent" src="/icon/medium.png"/></a><a class="" href="https://x.com/liu_qi_long/status/1846450947062738965"><img alt="" fetchpriority="high" width="20" height="20" decoding="async" data-nimg="1" style="color:transparent" src="/icon/x.png"/></a></div></div></div><a href="/blog/embed-gif-in-latex-beamer"><hr class="mt-2 mb-2 text-slate-700"/><p class="text-xs md:text-sm text-slate-700 line-clamp-5"> Embed GIF and MP4 in LaTeX Beamer As an research postgraduate student, I frequently make academic looking slides for meetings, which comprise a lot of references, tables, charts, and sometimes math equations. LaTeX is excellent for typesetting these elements, so using LaTeX to make slides sounds like a good idea. With tutorials like Beamer Overleaf, I got started with this approach and feel more and more comfortable. I even made a series of templates for me and my friends for more details Beamer LaTeX Themes . Here are some example pages PolyU math However, LaTeX only generates PDF files, which are usually static. Excluding videos and GIFs completely from your presentation How pitiful. I searched the internet for a while a...</p></a></div></div></div><div><div class="group rounded-lg mt-6 p-6 ring-1 ring-slate-900/5 shadow-lg space-y-3 hover:bg-slate-100"><div><div class="flex flex-col md:flex-row items-center"><a class="w-full md:w-auto md:shrink-0" href="/blog/convert-latex-to-word"><img alt="" loading="lazy" width="120" height="120" decoding="async" data-nimg="1" class="mx-auto w-[90%] h-auto md:w-[var(--post-imgsize)]" style="color:transparent;--post-imgsize:120px" src="/cover/blog/convert-latex-to-word.png"/></a><div class="md:ml-2 basis-4/5"><a href="/blog/convert-latex-to-word"><div class="text-sm md:text-base mb-1">Convert LaTeX to Word</div><div class="text-xs text-slate-700">2022-05-04</div></a><div class="flex mt-1"><a class="" href="https://medium.com/@liu-qilong/convert-latex-to-word-94f863f4dbdc"><img alt="" fetchpriority="high" width="20" height="20" decoding="async" data-nimg="1" style="color:transparent" src="/icon/medium.png"/></a><a class="" href="https://x.com/liu_qi_long/status/1846451169734152382"><img alt="" fetchpriority="high" width="20" height="20" decoding="async" data-nimg="1" style="color:transparent" src="/icon/x.png"/></a></div></div></div><a href="/blog/convert-latex-to-word"><hr class="mt-2 mb-2 text-slate-700"/><p class="text-xs md:text-sm text-slate-700 line-clamp-5">
1 LaTeX is a great tool for academic writing. However, not all collaborators may be familiar with it, and at times, you may need to convert your document into a Word file for reviewing and editing purposes. In my opinion, the best tool for this task is Pandoc an open source command line tool for free. Following the tutorial below, I installed pandoc and successfully converted paper.tex to paper.docx How to Convert from Latex to MS Word with Pandoc Zhelin Chen In this blog, I will share a simple command snippet that converts LaTeX to Word file. Additionally, I will also discuss some aspects that were not fully covered in the aforementioned tutorial. Conversion command After runing this command, a Word file will be generated in the . word folder pandoc paper.tex o word paper.docx reference doc word template.docx bibliography bibliogra...</p></a></div></div></div></div></div></div>
1<script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"allblog":[{"id":"vim-tricks","coverpath":"/cover/blog/vim-tricks.png","text":" Vim tricks Vim Install bash sudo apt install vim Basic operations Getting started with Vim The basics Opensource.com Give Me 20 Minutes and I ll Make You a Vim Motions Expert YouTube bash vim file Modes esc normal mode P.S. All pure character command should be used in normal mode in insert mode, the characters will be inserted, obviously i insert before a append after insert mode P.S. In command mode, use tab to select the suggestions r replace one character R write over replace mode Navigation hjkl All of these accept a count prefix, so 3j jumps down 3 lines at once Word level All of these accept a count prefix, so 3b jumps back 3 words at once w start of next word W start of next consecutive non blank word e end of current next word...","title":"Vim tricks","tags":["Hinton/CS"],"date":"2026-08-28","update":null},{"id":"python-tricks","coverpath":"/cover/blog/python-tricks.png","text":" Python tricks Core features Decoration function python def decorator func original func def wrapper func args, kwargs do something before result original func args, kwargs do something after return result return wrapper func decorator func def target func ... ... Loop Loop through a dictionary with it key value python for it, key, value in dict ... Loop through combinatons of lists python from itertools import product for i, j in product ls 1, ls 2 ... Scripting Command line arguments Example python import argparse parser argparse.ArgumentParser description Description of your script parser.add argument mesh dir , type str, required True, help Path to the mesh directory parser.add argument output , action store true , help Whether to save the output args parser.parse args args.mesh dir Access the mesh directory...","title":"Python tricks","tags":["Hinton/CS/Python"],"date":"2025-05-18","update":null},{"id":"ubuntu-dev-env","coverpath":"/cover/blog/ubuntu-dev-env.png","text":" Deep learning environment setup Install Ubuntu 22.04 LTS Install Ubuntu Desktop Ubuntu Ubuntu Releases Select the right version of Ubuntu is important. Softwares for deep learning like CUDA and NCCL provide specific compiles for different Ubuntu versions not all Ubuntu versions are available. In 2025, Ubuntu 22.04 and Ubuntu 20.04 are the safe choices. After install the OS, full upgrade of kernel packages must be done. Otherwise, newly added packages could clash. bash sudo apt update sudo apt full upgrade yes sudo apt autoremove yes sudo apt autoclean yes reboot Zsh shell Install bash sudo apt update sudo apt install y zsh set as default shell chsh s which zsh Plugins Install Zinit to add zsh with lightweight plugins bash bash c curl fail show error silent location https raw.githubusercontent.com zdh...","title":"Deep learning environment setup","tags":["Hinton/CS"],"date":"2025-04-22","update":"2025-10-29"},{"id":"good-reads-of-2024","coverpath":"/cover/blog/good-reads-of-2024.jpeg","text":" Good reads of 2024 Finally achieved the goal of reading 12 books in 2024 Having finished these books, I don t feel particularly different. Every day in life is still the same as always. But perhaps my perception of life has become sharper than before. If the length of life cannot easily be extended through personal effort, then perhaps maintaining sensitivity in perception is equivalent to broadening the width of life. img Following are my favorite books , movies , podcasts , and articles of this year. I hope that in 2025, I can also strive to remain spiritually free. Favorite Book of 2024 Hayek s The Road to Serfdom was the most challenging book I read this year, so much so that I still haven t finished organizing my notes its sentences feel as if they are engraved on stone tablets, impossible to rewrite or condense, only to be quoted. Looking back, the book speaks of nothing more than common sense, but holding on to common se...","title":"Good reads of 2024","tags":["Humboldt"],"date":"2024-12-31","update":null,"link_x":"https://x.com/liu_qi_long/status/1879795649522413632","link_rednote":"https://www.xiaohongshu.com/explore/6773b7ec000000000900fe40?xsec_token=ABQaEr8Mh7g0-Ezhvs0VqOJOEIzXxdKBa0aq5GsNColxc=\u0026xsec_source=pc_user"},{"id":"git-frequent-operations","coverpath":"/cover/blog/git-frequent-operations.png","text":" Git frequent operations Basic configurations User name bash git config global user.n
1ame Your Name Email bash git config global user.email email example.com Main branch name bash git config global init.defaultBranch name List all configurations bash git config list P.S. Change main branch name of an existed repository bash git branch m old name new name If it has been pushed to remote bash git push remote delete old name git push u remote new name Local repository operations Initialize the repository bash git init Current branch operations Discard changes bash git restore file Discard all files changes bash git restore . Stage changes bash git add file P.S. Use f to force stage a file even if it s set to be ignored in .gitignore . Unstage the file changes bash git restore staged file P.S. Unstage...","title":"Git frequent operations","tags":["Hinton/CS/Git"],"date":"2024-12-26","update":null,"link_x":"https://x.com/liu_qi_long/status/1872581308846952651"},{"id":"travel-time-analysis","coverpath":"/cover/blog/travel-time-analysis.png","text":" Travel time analysis with Apple Shortcut Motivation Travel during public holidays in China is a headache inducing activity, especially during national day holidays, one of the longest public holidays. People tend to pour out to visit their family friends or travel to long expecting tour sites. Traffic could be overwhelmingly heavy during this period. To deal with this situation, some schedule their travel time carefully. Long before the off duty time of 31 Sep, the day before the holiday begins, people check their map apps anxiously again and again to get a glimpse of the development of traffic jams. Experiences of the best time for departure spread on social media, though they tend to convey conflicting speculations. I got on the road at 7 30 on 1 Oct, hoping an earlier departure could make my journey easier, yet I got stuck on the road for around 10 hours, which was around 3x the ordinary travel time. P.S. I later realized that I almost chose the worst time to go... P.S...","title":"Travel time analysis with Apple Shortcut","tags":["Hinton/CS","Odyssey"],"date":"2024-10-10","update":"2024-10-11","link_github":"https://github.com/liu-qilong/scripts/blob/main/notebook/travel-time-analysis/analysis.ipynb","link":"https://www.icloud.com/shortcuts/818e538f2b2c45b6804d73515557a54e","link_medium":"https://medium.com/@liu-qilong/travel-time-analysis-with-apple-shortcut-bb49a596f2b0","link_x":"https://x.com/liu_qi_long/status/1846447008141529131","link_rednote":"https://www.xiaohongshu.com/explore/67079f43000000002c02e597?xsec_token=ABYDZe8Ohp1TX7N4mMg5ARhUGqlxf6qd52QXBI6bRW2Fw=\u0026xsec_source=pc_user"},{"id":"cal-newport-time-management","coverpath":"/cover/blog/cal-newport-time-management.png","text":" Cal Newport s time management system Cal Newport s time management system is summarized in The Time Block Planner Cal Newport. Combining the techniques discussed in this tiny pamphlet and his other books podcasts, I compiled this blog post. Core value of time management Cal Newport advocates his time management system in his books and youtube channel. It s both time efficient, lightweight, and deliver the most important values of any time management system Time management frees your mental stress on remembering all the todos dues bouncing around your head. Time management has you articulately think about how can you complete your tasks in time. By doing this, you will soon realize that the task is more complicated than your expectation and you don t have so many allocable time, which boost motivation. e.g. Think about PhD application ...","title":"Cal Newport's time management system","tags":["Achilles/Carrer"],"date":"2024-04-15","update":"2024-05-12","link_x":"https://x.com/liu_qi_long/status/1846449294993510436"},{"id":"latexdiff-best-practice","coverpath":"/cover/blog/latexdiff-best-practice.png","text":" latexdiff mark changes of LaTeX documents When submitting academic manuscript, it s usually mandatory to submit the marked changes for revisions resubmissions. Word is particularly handy in this regard. But if your manuscript is consists of lots math formula, e.g. in the field of deep learning, LaTeX is a more common choice. In this case, latexdiff is the go to choice for generating the document with marked changes. Install latexdiff Follow the instruction on the official documentation GitHub ftilmann latexdiff Compares two latex files and marks up significant differences between them. Releases on www.ctan.org and mirrors Prepare files Copy the whole folder of the two versions of LaTeX documents that are being compared, say one is draft 0 while the other is draft 2 . Make sure that each of them can be successfully compiled. About the figures and other resources If you stored figures in the other folder, y...","title":"latexdiff: mark changes of LaTeX documents","tags":["Hinton/CS/LaTeX"],"date":"2024-03-23","update":"2024-03-24","link_medium":"https://medium.com/@liu-qilong/best-practices-for-marking-changes-of-latex-documents-45451db41bb7","link_x":"https://x.com/liu_qi_long/status/1846449869051064390"},{"id":"set-conv-padding","coverpath":"/cover/blog/set-conv-padding.gif","text":" How to set the padding of convolution to make the stride acting as a scale factor img Cover image source A guide to convolution arithmetic for deep learning Vincent Dumoulin, Francesco Visin ArXiv When doing convolution, the kernel is shift around the input image. Let s consider the case when the kernel moves left to right. The up to down scenario are just the same. Constrains Let s denote the padding size as p , the image width as w , the kernel size as k , and the stride as s . Then the total length of image width plus padding should be 2p w At the begging, the kernel is placed on the left of this total length, and is then moved towards right side with step length of s , until no more space is available. Denotes the number of the placable potions as n , then the output width of the convolution is also n . It should satisfys 2p w s k n 1 s leq 2p w a When will the ...","title":"How to set the padding of convolution to make the stride acting as a scale factor","tags":["Hinton/ML"],"date":"2024-03-13","update":"","link_x":"https://x.com/liu_qi_long/status/1846821014564667636"},{"id":"how-trans-conv-work","coverpath":"/cover/blog/how-trans-conv-work.gif","text":" Why transposed convolution can be used to reconstruct activating features from the input images Cover image source A guide to convolution arithmetic for deep learning Vincent Dumoulin, Francesco Visin ArXiv In ZF Net, the transposed convolution is used to approximate the inverse of convolution, leading to the reconstruction of the activating features from the input image that activates a particular layer. However, strictly speaking, the transposed convolution is not really the inverse of convolution. Then why can it be used to do the reconstruction What is transposed convolution An ordinary convolution can be written in the form of Y C X . Then the corresponding transposed convolution is defined as X C T Y What yields the largest response The convolution Y C X and be transformed to the vectorized form y i c i T x where x is...","title":"Why transposed convolution can be used to reconstruct activating features from the input images","tags":["Hinton/ML"],"date":"2024-03-13","update":"2024-03-14","link_x":"https://x.com/liu_qi_long/status/1846821235948400889"},{"id":"wsl-dev-env","coverpath":"/cover/blog/wsl-dev-env.png","text":" A complete guide to setup WSL Windows Subsystem for Linux WSL Windows Subsystem for Linux has various great advantages against dual boot installing Linux and Windows on the same computer , among them the most significant is that you can literally running both systems at the same time without the need to stop every software that s running and reboot to another system. Procedure to set up a WSL is roughly the same as setting up a real Linux OS, therefore this guide can also be used as a reference to Linux setup. The specifications of W
1SL setup procedure are mainly in Install WSL , CUDA and PyTorch , VTK with PyVista, and Remote development with SSH as described below. Install WSL Install WSL Microsoft Learn In PowerShell, run wsl install After restart the computer, the terminal will prompt you to set the user name and password for the WSL. Then you can then enter the linux subsystem by enter ws...","title":"A complete guide to setup WSL (Windows Subsystem for Linux)","tags":["Hinton/CS"],"date":"2023-11-02","update":"2023-12-06","link_medium":"https://medium.com/@liu-qilong/a-complete-guide-to-setup-wsl-windows-subsystem-for-linux-4547e88b6cdb","link_x":"https://x.com/liu_qi_long/status/1846450474117169238"},{"id":"win-ssh-host","coverpath":"/cover/blog/win-ssh-host.png","text":" Setup Windows machine as SSH host In the previous blog post, I set up the development environment on a Windows machine. I further set it up as a ssh server that can be access by my laptop over the internet. Following is the summarization of some critical steps and relevant materials. Setup SSH host Install OpenSSH Get started with OpenSSH for Windows Microsoft Learn Check installation status of OpenSSH Get WindowsCapability Online Where Object Name like OpenSSH Install the OpenSSH Client Add WindowsCapability Online Name OpenSSH.Client 0.0.1.0 Install the OpenSSH Server Add WindowsCapability Online Name OpenSSH.Server 0.0.1.0 Set PowerShell as the default shell the shell you enter when ssh into this host New ItemProperty Path HKLM SOFTWARE OpenSSH Name DefaultShell Value ...","title":"Setup Windows machine as SSH host","tags":["Hinton/CS"],"date":"2023-06-08","update":"2023-06-11","link_medium":"https://medium.com/@liu-qilong/setup-windows-machine-as-ssh-host-75627200fb46","link_x":"https://x.com/liu_qi_long/status/1846821529197433043"},{"id":"win-dev-env","coverpath":"/cover/blog/win-dev-env.png","text":" Setup Windows development environment Recently, I tried to set up a Windows machine for development, focusing on Python, machine learning PyTorch with CUDA , and web development Node.js with NPM . Following is the summarization of some critical steps and relevant materials. Later, I further set it up as a ssh server that can be accessed by my laptop over the internet. If you are interested, please check this post. PowerShell In Windows, PowerShell is more powerful than the legacy cmd shell in terms of system administration, configuration management, and perform administrative tasks. Terminal execution policy Firstly, enter PowerShell in administrator mode and modify the execution policy to enable shell scripting Set ExecutionPolicy Scope CurrentUser ExecutionPolicy Unrestricted Powershell autocomplete Fish like Autosuggestion in Powershell DEV Community...","title":"Setup Windows development environment","tags":["Hinton/CS"],"date":"2023-06-08","update":"2023-06-11","link_medium":"https://medium.com/@liu-qilong/setup-windows-development-environment-db5b4cf3dfec","link_x":"https://x.com/liu_qi_long/status/1846450726555521248"},{"id":"latex-frequent-snippets","coverpath":"/cover/blog/latex-frequent-snippets.png","text":" LaTeX frequent snippets Basic elements Section numbering Alphabetical numbering latex renewcommand thesection Alph section setcounter section 0 reset counter to start from A Math Matrix latex begin bmatrix x 11 x 12 x 13 dots x 1n x 21 x 22 x 23 dots x 2n x d1 x d2 x d3 dots x dn end bmatrix Matrix bolding mathbf Transpose top hat x, tilde x, overline x hat x, tilde x, overline x Argmin with centered subscript latex underset Theta p, Theta s, Theta a operatorname argmin Additional symbols List of LaTeX mathematical symbols OeisWiki Listing latex begin itemize item end itemize latex begin enumerate item end enumerate Algorithm latex usepackage algorithm usepackage algpseudocode ...","title":"LaTeX frequent snippets","tags":["Hinton/CS/LaTeX"],"date":"2023-05-23","update":"2025-04-23","link_x":"https://x.com/liu_qi_long/status/1872581509066145833"},{"id":"conda-frequent-commands","coverpath":"/cover/blog/conda-frequent-commands.png","text":" Conda frequent commands When working on a Python project, it s considered good practice to create a virtual environment. In this case, every project is running in a separate environment, with their own dependencies. This can save you tons of headache if you install all your projects dependencies in one place, things may quickly crash with each other. I personally learned this lesson the hard
1way after spending an entire night trying to fix version crashes. Eventually, I had no choice but to delete everything and start from scratch. You certainly do not want to experience the same frustration as me and you don t have to. With conda virtual environment, all your projects have their own territory to play and there is zero chance for crashing with each other. To gain a proper understanding of conda , the following resources will be helpful. Additionally, some commonly used commands will be extracted and listed in this blog post for easy reference. Managing conda Con...","title":"Conda frequent commands","tags":["Hinton/CS/Python"],"date":"2023-03-08","update":"2023-04-27","link_x":"https://x.com/liu_qi_long/status/1846821855820415479"},{"id":"sphinx-rtd-my-optimized-documentation-workflow","coverpath":"/cover/blog/sphinx-rtd-my-optimized-documentation-workflow.png","text":" Sphinx ReadTheDocs My optimized documentation workflow Sphinx is an excellent tool for documenting Python projects. It can generate comprehensive documentation from docstrings in the code, which means that the comments you write for your code also serve as its documentation. If you are not familiar with writing docstrings or Sphinx documentation, I highly recommend checking out this tutorial A How to Guide for Sphinx ReadTheDocs sglvladi My workflow was adapted from this tutorial with some personalization. Here is an example example Folder structure and setup Under the root folder of the project, there are docs for storing documentation, projectna...","title":"Sphinx + ReadTheDocs: My optimized documentation workflow","tags":["Hinton/CS/Python"],"date":"2022-11-18","update":"2023-04-27","link_medium":"https://medium.com/@liu-qilong/sphinx-readthedocs-my-optimized-documentation-workflow-169308270e99","link_x":"https://x.com/liu_qi_long/status/1846822181810082106"},{"id":"embed-gif-in-latex-beamer","coverpath":"/cover/blog/embed-gif-in-latex-beamer.png","text":" Embed GIF and MP4 in LaTeX Beamer As an research postgraduate student, I frequently make academic looking slides for meetings, which comprise a lot of references, tables, charts, and sometimes math equations. LaTeX is excellent for typesetting these elements, so using LaTeX to make slides sounds like a good idea. With tutorials like Beamer Overleaf, I got started with this approach and feel more and more comfortable. I even made a series of templates for me and my friends for more details Beamer LaTeX Themes . Here are some example pages PolyU math However, LaTeX only generates PDF files, which are usually static. Excluding videos and GIFs completely from your presentation How pitiful. I searched the internet for a while a...","title":"Embed GIF and MP4 in LaTeX Beamer","tags":["Hinton/CS/LaTeX"],"date":"2022-06-20","update":"2023-07-16","link_medium":"https://medium.com/@liu-qilong/embed-gif-in-latex-beamer-ed5ced8c041","link_x":"https://x.com/liu_qi_long/status/1846450947062738965"},{"id":"convert-latex-to-word","coverpath":"/cover/blog/convert-latex-to-word.png","text":" LaTeX is a great tool for academic writing. However, not all collaborators may be familiar with it, and at times, you may need to convert your document into a Word file for reviewing and editing purposes. In my opinion, the best tool for this task is Pandoc an open source command line tool for free. Following the tutorial below, I installed pandoc and successfully converted paper.tex to paper.docx How to Convert from Latex to MS Word with Pandoc Zhelin Chen In this blog, I will share a simple command snippet that converts LaTeX to Word file. Additionally, I will also discuss some aspects that were not fully covered in the aforementioned tutorial. Conversion command After runing this command, a Word file will be generated in the . word folder pandoc paper.tex o word paper.docx reference doc word template.docx bibliography bibliogra...","title":"Convert LaTeX to Word","tags":["Hinton/CS/LaTeX"],"date":"2022-05-04","update":"2023-04-27","link_medium":"https://medium.com/@liu-qilong/convert-latex-to-word-94f863f4dbdc","link_x":"https://x.com/liu_qi_long/status/1846451169734152382"}]},"__N_SSG":true},"page":"/blog","query":{},"buildId":"lQjvM1X2RBEEsgaotyol-","isFallback":false,"gsp":true,"scriptLoader":[]}</script>
1</body></html>
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.