Skip to content

Instantly share code, notes, and snippets.

Train Store Customer XGB LBM RF
v - - 23% 46% 30%
v v - 20% 32% 16%
v v stat 18% 21% 16%
v v exact 0.7% 12% 0.7%
Dataset Classification/Regression Image Audio Video Study Perfromance
TAU Urban 10 v v
* ADVANCE 13 512 x 512 jpg 10s wav 2D CNN (blog) 90+
DISCO v v
* Crowed 5 v v 3D CNN (16,32,32,3) --> 90+
XD-Violence 7 v v
* UCF101 101 v v 3D CNN (16,64,64,3) --> 70+
MM-Office 12 v v
ID Class Total Train (original) Train (augmented) Test
0 airport 185 164 949 21
1 beach 216 195 949 21
2 bridge 280 259 949 21
3 farmland 430 390 949 40
4 forest 862 773 949 89
5 grassland 150 140 949 10
6 harbour 508 466 949 42
7 lake 357 318 949 39
8 orchard 207 189 949 18
Confusion Matrix ---------------------------------------------
[[ 20 0 0 0 0 0 0 0 0 1 0 0 0]
[ 0 18 0 0 0 0 2 0 0 1 0 0 0]
[ 0 0 21 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 40 0 0 0 0 0 0 0 0 0]
[ 0 0 0 2 84 0 0 0 0 1 2 0 0]
[ 0 0 0 0 0 10 0 0 0 0 0 0 0]
[ 0 0 0 0 0 0 41 0 0 1 0 0 0]
[ 0 0 0 1 2 0 0 36 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 18 0 0 0 0]
Confusion Matrix -----------------------------------------
[[ 9 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 21 1 1 2 0 0 0 0 1 0 0 0]
[ 0 0 32 0 0 0 0 0 0 1 0 0 0]
[ 0 0 0 44 0 0 0 0 0 0 0 0 0]
[ 0 1 0 4 80 0 0 0 0 2 1 0 0]
[ 0 0 0 0 2 19 0 0 0 0 0 0 0]
[ 0 2 1 0 0 0 46 0 0 0 0 0 1]
[ 0 0 0 0 2 0 0 29 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 12 0 0 0 0]
ID Class Total Train (original) Train (augmented) Test
0 airport 185 176 944 9
1 beach 216 190 944 26
2 bridge 280 247 944 33
3 farmland 430 386 944 44
4 forest 862 774 944 88
5 grassland 150 129 944 21
6 harbour 508 458 944 50
7 lake 357 326 944 31
8 orchard 207 195 944 12
Layer (type) Output Shape Param #
=======================================================================================
conv2d (Conv2D) (None, 102, 512, 16) 160
conv2d_1 (Conv2D) (None, 102, 512, 16) 2320
SpatialDropout2D_1_0.1 (SpatialDropout2D) (None, 102, 512, 16) 0
max_pooling2d (MaxPooling2D) (None, 51, 256, 16) 0
conv2d_2 (Conv2D) (None, 51, 256, 64) 9280
conv2d_3 (Conv2D) (None, 51, 256, 64) 36928
SpatialDropout2D_2_0.1 (SpatialDropout2D) (None, 51, 256, 64) 0
max_pooling2d_1 (MaxPooling2D) (None, 25, 128, 64) 0
Environment Python Keras Tensorflow PyTorch CUDA CUDNN Transformer Comment
base 3.7.3 2.8.0 2.8.0 1.7.1 10.0.130 keras/cifar10 run but cuda is not activate
bio-env 3.7.3 2.6.0 2.6.0 1.9.0 (vision/audio) 10.2.89 4.8.1 tensorflow export_saved_model error
audio-env 2.2.5 1.14.0 11.3.1
dgl-env 1.9.0
graph-env 3.8.10 2.4.3 2.3.1 1.7.0 10.2.89 keras/cifar10 run but cuda is not activate
torch-env 3.6.7 1.6.0 (vision/audio) 10.2.89
transformer 3.8.13 2.8.0 2.8.0 Keras ViT test3.py slow
motion 3.7.11 (vision/audio) 10.1.243 Huggingface ViT hf_vit.py verbose
tf20-gpu 3.8.13 2.8.0 2.0.0 10.0.130 7.6.0
+----+------------------------------------------------------+-----------------+----------------------------------------------------+------------------------------------------------------------+
| No | Masked Sentence | Masked Position | BERT Prediction | DistilRoBERTa Prediction |
+----+------------------------------------------------------+-----------------+----------------------------------------------------+------------------------------------------------------------+
| 1 | Paris is the [MASK] of France | middle | ['capital(1.00)', 'center(0.00)', 'city(0.00)'] | [' capital(0.49)', ' heart(0.06)', ' Capital(0.06)'] |
| 2 | [MASK] is the capital of France | begin | ['it(0.34)', 'paris(0.30)', 'toulouse(0.05)'] | ['Paris(0.86)', 'bourg(0.06)', ' Paris(0.02)'] |
| 3 | [MASK] is the capital of France.
from transformers import pipeline
fillmask_bert = pipeline('fill-mask', model="bert-base-uncased")
sentence = "Paris is the [MASK] of France."
print(sentence)
pred = fillmask_bert(sentence)
for item in pred:
print(item)