Ben Chuanlong Du's Blog

It is never too late to learn.

Save and Load PyTorch Models

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. PyTorch uses pickle to serialize and deserialize objects.

  2. The PyTorch convention is to use the file extension .pt or .pth for saving model (or its parameters) and use the file extension …

General Tips for Gradle

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Install & Upgrade Gradle

The latest version of gradle can be installed via PPA on Ubuntu.

sudo add-apt-repository ppa:cwchien/gradle
sudo apt-get update

And gradle can be upgraded using the following …

Tips on Deep Graph Learning

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

https://github.com/dmlc/dgl

Tips on FFmpeg

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

It is suggested that you use OpenCV for Python and moviepy (instead of FFmpeg) to manipulate multimedia.

  1. extrac audio from video

  2. convert between different formats of audios

Record Screen

The command …

Tips on C++ Compilers

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

GCC

  1. User option -lpthread to link the thread library when your code use the thread library. If you do not use, the option -lpthread, you can probably compile your coe without …

Computer Vision Tools

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

OpenCV | OpenCV for Python

Pillow

moviepy

moviepy is a Python library for video editing: cutting, concatenations, title insertions, video compositing (a.k.a. non-linear editing), video processing, and creation of custom …