Latest

Using matplotlib to create publishable graphs

Working or sleeping, I dream of graphs - usually of rather fancy graphs on academic journals. When I think how brilliant graphs impact my feelings, I wonder about the code behind, for I am extremely tired of, and frightened by making plots by hand in Origin Lab or some other software.

2020-07-08 / 5 min read

Solving the problem of clangd not finding system header of MSVC

Clangd is a language server that can work with many editors via a plugin, such as the clangd plugin in VSCode. Generally, the plugin is used in couple with cmake or other tools which can generate a compile-commands.json file. It is a very good plugin, maybe better than the Microsoft's C/C++ plugin. However, there are still some annoying issues, especially on Windows. One of them is that clangd can't find the system headers, such as iostream, fstream. To solve this, one way is to manually specify the include directories of system headers in the clangd configure file.

2024-04-24 / 2 min read

Content Uniformity Tests Implementation Based on Monte-Carlo simulation in C++ and Python

Content uniformity tests process Implemention in C++ and Python codes. Using C++ to speed codes for 100 times.

2022-05-16 / 35 min read

Openblas vs Intel MKL for Numpy and AMD CPUs

Choose the faster library, OpenBLAS or MKL for AMD CPUs.

2022-02-25 / 4 min read

L2 regularization vs Weight decay

2021-09-14 / 2 min read

From Keras to PyTorch

This post is to record the issues I encounted during the implementation from Keras to PyTorch. At first the structure of the CNN modes is introduced. Then, the codes in Keras are shown. Next, The partial implementation in pure Pytorch is given and at last, the implementation in Pytorch Lightning is also presented.

2021-08-22 / 12 min read