Your First Model
A comprehensive guide to building your first ML model from scratch.
Overview
In this tutorial, you will learn how to create a simple image classification model using 1.ML. By the end, you will have a fully trained model deployed and ready to make predictions.
1. Prepare Your Data
from oneml import Dataset
# Load and prepare your dataset
dataset = Dataset.load("./images")
train, test = dataset.split(ratio=0.8)2. Define Your Model
from oneml import Model, layers
model = Model([
layers.Conv2D(32, kernel=3),
layers.MaxPool2D(),
layers.Dense(128),
layers.Output(10)
])3. Train and Deploy
# Train the model
model.fit(train, epochs=10)
# Deploy to production
model.deploy("my-classifier")