Ben Chuanlong Du's Blog

It is never too late to learn.

Tips on TPU

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

References

https://cloud.google.com/tpu/docs/tutorials/resnet-alpha-py

https://cloud.google.com/tpu/docs/tutorials

https://towardsdatascience.com/running-pytorch-on-tpu-a-bag-of-tricks-b6d0130bddd4

Calling Rust from Java

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

https://github.com/drrb/java-rust-example

https://users.rust-lang.org/t/ffi-java-call-a-rust-dynamic-library/19924

https://docs.rs/jni/0.14.0/jni/

https://stackoverflow.com/questions/30258427/calling-rust-from-java

https://github.com/java-native-access/jna …

Regularization in Machine Learning Models

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

Regularization add a penalty term to the loss function in machine learning models. The type of regularizatin depends on the type of penalty used (not the type of the objective function …

Optimization Method in Machine Learning

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

L-BFGS converges faster and with better solutions on small datasets. However, ADAM is very robust for relatively large datasets. It usually converges quickly and gives pretty good performance. SGD with momentum …

Optimization Algorithms

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

If the objective function has derivative, then an optimization problem is equivalent to finding the root of the derivative of the object function.

Finding Root

  • Linear Search Only good for 1-dimensional …

Tips on XGBoost

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

  1. It is suggested that you use the sklearn wrapper classes XGBClassifier and XGBRegressor so that you can fully leverage other tools of the sklearn package.

  2. There are 2 types of boosters …