How to unfold two Arrays in BigQuery
Imaing we have data like this: WITH Sequences AS (SELECT 1 AS id, [0, 1, 1, 2, 3, 5] AS prod_type, [1.1, 1.2, 2.1, 2.3, 3.3, 3.4] AS prod_price, UNION ALL SELECT 2 AS id, [2, 4, 8, 16, 32] AS...
View ArticleAn experiment about my stupid idea
After training both image classification and sound classification deep learning models. I found out that the image training is much slower than the sound training, although the sound dataset is much...
View ArticleFix the launching problem of Android Studio on Macbook
After I installed two versions of JDK (17 and 21) and uninstalled them, I saw this error when trying to launch my Android Studio. This error is hard to fix. Reinstalling Android Studio won’t fix it....
View ArticleResizing a image is not as easy as you think
I found a very interesting picture: The size of this image is about 8MB although it’s blurring. Then I use below python code to try to resize it using different interpolation strategy: import cv2 img...
View ArticleHow to change App name in Google Play Console?
Just one picture: I don’t know why the editing place of App name is under “Grow users”. But unfortunately, it’s there. After you change the “App name” and click “Save” (You also need to upload a bunch...
View ArticleTry to understand Variational Autoencoders
ELBO as the Loss Function Note: “p(x|z)” means True Posterior, “q(z|x)” means Approximate Posterior What if only use first term of the Loss? What’s the meaning of “GAN tend to lack full support over...
View ArticleExperiments about ‘torchao’
‘torchao‘ is a python library that support PyTorch native quantization and sparsity for training and inference. I just finished some experiments/tests with it for my image-classification project,...
View ArticleExperiments about ‘accelerate’ library of HuggingFace
If you want to run your training code with ‘accelerate‘ fp8, you need to install ‘transformer_engine‘ or ‘MS-AMP‘. But these two packages are hard to install beccause they depends on specific...
View ArticleDifferent default behaviour of JPEG encoding for dart and python
In dart, create JPEG file is like: import 'dart:io'; import 'package:image/image.dart'; ... List<int> resizedBytes = encodeJpg(resizedImage); File(outputPath).writeAsBytesSync(resizedBytes) In...
View ArticleUse repeated dataset correctly with timm’s data loader
For an experiment of metaformer, I was trying to add CIFAR100 dataset into the training script. Since CIFAR100 is too small, I need to let it repeat mulitple times in one epoch. Therefore I add a new...
View Article