from fastbook import *
from fastai.vision.all import *
from pathlib import Path
path = Path('data2')
path
Path('data2')
def is_buy(x): return x[0]=="T"
dls = ImageDataLoaders.from_name_func(
path, get_image_files(path), valid_pct=0.2, seed=42,
label_func=is_buy, item_tfms=Resize(224))
learn = cnn_learner(dls, resnet34, metrics=error_rate)
learn.fine_tune(5)
epoch | train_loss | valid_loss | error_rate | time |
---|---|---|---|---|
0 | 1.220044 | 0.910795 | 0.483412 | 00:25 |
epoch | train_loss | valid_loss | error_rate | time |
---|---|---|---|---|
0 | 1.037957 | 0.840327 | 0.487204 | 00:31 |
1 | 0.922677 | 0.777105 | 0.472986 | 00:31 |
2 | 0.822957 | 0.745550 | 0.496682 | 00:31 |
3 | 0.751167 | 0.711318 | 0.497630 | 00:31 |
4 | 0.720383 | 0.703557 | 0.472038 | 00:31 |