Jingbiao's Blog

「Hinc lucem et pocula sacra」

4F14 Revisions

Computer systems

ISA Load-store instruction set architecture It is an example of GPR (General Purpose Register) architecture. The operands for the arithmetic and logic operation must be registers not memory addres...

4F12 Revisions

Computer visions

Question 1 Image structures Implementing Gaussian/Low-Pass Filters Fourier transform of the Gaussian is a low pass filter, with the frequency cut-off at $1/\sigma$ Why smoothing is necessary: ...

C++ thread dynamic link issue

For multithreading concurrent program in C++, for example: 1 2 3 4 5 6 7 8 9 10 #include <iostream> #include <thread> void thread_init() { std::cout<<"This statement is executed ...

Cross entropy and KL divergence (relative entropy)

\( \require{amstext} \require{amsmath} \require{amssymb} \require{amsfonts} \newcommand{\eg}{\textit{e}.\textit{g}.} \newcommand{\xb}{\mathbf{x}} \newcommand{\yb}{\mathbf{y}} \newcommand{\xbtn}{\ti...

Gaussian Process with GPML toolbox

Statistical machine learning

\( \require{amstext} \require{amsmath} \require{amssymb} \require{amsfonts} \) Function initialization 1 2 3 meanfunc = @meanZero; % zero mean function covfunc = @covSEiso; % Squared E...

Edge Detections implementation details

Computer visions

1D Edge Detection and the optimizations Simple method: Computing gradient However, with high frequency noises, the gradient could be even more noisier Therefore, Gaussian Smoothing is applie...

ROC Curves and Precision-Recall Curves

Summary ROC Curves summarize the trade-off between the true positive rate and false positve rate for a predictive model using different probability thresholds. Precision-Recall cu...

Threshold Moving - Finding optimal threshold for classification

Introduction Balanced class A class label is being predicted within a classification task. Most of the time, a threshold of 0.5 is used. Larger than 0.5 for one class (1), smaller than 0.5 for ano...

Argparser python usage

import 1 import argparse Initialise argparser 1 parser = argparse.ArgumentParser() Add arguments for the parser 1 2 parser.add_argument('--value', '-v', type=str, default='def', ...

Issue with transformer and Pytorch conflicts

In one project, the transformers package has to be version:transformers==3.5.1, and Pytorch has be >= 1.8.0 - Installing the legacy version may have some conflicts, but anaconda sh...