Downloads · 30 days
0
SergioCabrera/DemoCaballos
DemoCaballos is a machine learning model from SergioCabrera. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
!pip install -Uqq fastbook !pip install fastai==2.5 import fastbook fastbook.setupbook()
Downloads · 30 days
0
Access
Public
Updated Mar 24, 2022
Repo size
—
Likes
0
Public
Click a slice to open those files.
.ipynb31.8 KB · 93%
From the Hugging Face model README
!pip install -Uqq fastbook !pip install fastai==2.5 import fastbook fastbook.setup_book()
from fastbook import * from fastai.vision.widgets import *
path = Path('/content/gdrive/My Drive/caballos')
modelo = DataBlock( blocks=(ImageBlock, CategoryBlock), get_items=get_image_files, splitter=RandomSplitter(valid_pct=0.2, seed=42), get_y=parent_label, item_tfms=RandomResizedCrop(224, min_scale=0.5), batch_tfms=aug_transforms())
dls = modelo.dataloaders(path)
learn = cnn_learner(dls, resnet18, metrics=error_rate) learn.fine_tune(4)