tracel-ai / models

Models and examples built with Burn
Apache License 2.0
180 stars 24 forks source link

[ResNet] Add fine-tuning example #29

Closed laggui closed 6 months ago

laggui commented 6 months ago

Added a fine-tuning example for multi-label classification on the Planet dataset sample. Inspired by this post when I was looking for multi-label classification datasets examples.

I consistently get >92% multi-label accuracy when running the example. Training is pretty quick (even on my peasant laptop GPU w/ 6GB VRAM).

Last run:

======================== Learner Summary ========================
Model: ResNet[num_params=11194833]
Total Epochs: 5

| Split | Metric        | Min.     | Epoch    | Max.     | Epoch    |
|-------|---------------|----------|----------|----------|----------|
| Train | Loss          | 0.078    | 5        | 0.381    | 1        |
| Train | Hamming Score | 84.303   | 1        | 97.193   | 5        |
| Valid | Loss          | 0.192    | 5        | 0.412    | 1        |
| Valid | Hamming Score | 86.667   | 1        | 94.078   | 5        |

Training completed in 5m50s
Predicted: ["partly_cloudy", "primary"]
Expected: ["partly_cloudy", "primary"]