Skip to main content
Overview

TIL Training Plan 2021.08.24

Summary

The training plan is the same as the previous TIL. I couldn’t figure out how to implement ensemble learning, so I went with simple if-statements for now.

The 18 classes are determined by 3 feature conditions. I could have hardcoded 18 if-statements, but I used Python itertools’ product instead.

mask = [0, 1, 2]
gender = [0, 1]
age = [0, 1, 2]
label_number = list(product(mask, gender, age))

The prerequisite is that the 3 features and class numbers must be in ascending order. Fortunately, they were. I match the outputs from 3 models against label_number to get the final class.

As a diagram:

undefined

Ensemble learning

ref: https://bkshin.tistory.com/entry/%EB%A8%B8%EC%8B%A0%EB%9F%AC%EB%8B%9D-11-%EC%95%99%EC%83%81%EB%B8%94-%ED%95%99%EC%8A%B5-Ensemble-Learning-%EB%B0%B0%EA%B9%85Bagging%EA%B3%BC-%EB%B6%80%EC%8A%A4%ED%8C%85Boosting

  • Bagging (parallel): Suppose you have models with the same output. Multiple models with the same structure repeatedly sample from the same dataset and train (Bootstrap Aggregation). Apparently, sampling multiple times from the same dataset improves learning effectiveness.
  • Boosting (sequential): Uses different models. The results of the previous model are reused by weighting the data during the next model’s training.

There’s no silver bullet for choosing between them. Pick what fits the domain and problem.

  • Boosting tends to have lower error than bagging.
  • Boosting is slower to train and more prone to overfitting.
  • Low model performance is the issue -> Try boosting.
  • Overfitting is the issue -> Try bagging.

Model change

https://paperswithcode.com/sota/image-classification-on-imagenet CNN ranking I referenced.

Plan

For now, let me train efficientnet with more epochs and kfoldsplits… 8 hours gone.

Loading comments...