rasbt / machine-learning-notes

Collection of useful machine learning codes and snippets (originally intended for my personal use)
BSD 3-Clause "New" or "Revised" License
787 stars 141 forks source link

vgg16-cifar10 - RX 6800 XT #39

Open johanesalxd opened 1 year ago

johanesalxd commented 1 year ago

Hi, thanks for sharing the script! Just tested this one on my machine (click here for specs) with ROCm and here's the result:

torch 2.0.1+rocm5.4.2
device cuda
Files already downloaded and verified
Using cache found in /home/joalex/.cache/torch/hub/pytorch_vision_v0.11.0
/home/joalex/python_venv/pytorch_rocm/lib/python3.10/site-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
  warnings.warn(
/home/joalex/python_venv/pytorch_rocm/lib/python3.10/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=None`.
  warnings.warn(msg)
Epoch: 001/001 | Batch 0000/1406 | Loss: 2.5032
Epoch: 001/001 | Batch 0100/1406 | Loss: 2.3094
Epoch: 001/001 | Batch 0200/1406 | Loss: 2.3373
Epoch: 001/001 | Batch 0300/1406 | Loss: 2.2011
Epoch: 001/001 | Batch 0400/1406 | Loss: 2.2720
Epoch: 001/001 | Batch 0500/1406 | Loss: 2.2830
Epoch: 001/001 | Batch 0600/1406 | Loss: 2.3781
Epoch: 001/001 | Batch 0700/1406 | Loss: 2.2695
Epoch: 001/001 | Batch 0800/1406 | Loss: 2.2710
Epoch: 001/001 | Batch 0900/1406 | Loss: 2.3375
Epoch: 001/001 | Batch 1000/1406 | Loss: 2.1730
Epoch: 001/001 | Batch 1100/1406 | Loss: 2.2199
Epoch: 001/001 | Batch 1200/1406 | Loss: 2.0753
Epoch: 001/001 | Batch 1300/1406 | Loss: 2.0389
Epoch: 001/001 | Batch 1400/1406 | Loss: 1.9053
Time / epoch without evaluation: 6.33 min
Epoch: 001/001 | Train: 19.30% | Validation: 19.88% | Best Validation (Ep. 001): 19.88%
Time elapsed: 7.94 min
Total Training Time: 7.94 min
Test accuracy 20.15%
Total Time: 8.26 min
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.2 LTS
Release:    22.04
Codename:   jammy
rasbt commented 1 year ago

Thanks for sharing! Haha, since this repo now has so many subfolders, which of the codes is this for? 😅

johanesalxd commented 1 year ago

No worries! It's from this one here. I'm currently trying pytorch on rocm (amd) but wondering what kind of performance that I can expect from my GPU. Thankfully I read your blog and can test it on my own!