Update README.md

This commit is contained in:
Chenggang Zhao 2023-11-06 00:29:00 +08:00 committed by GitHub
parent e1cc9ae6d9
commit e593c64f7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -203,6 +203,8 @@ def load_data():
def evaluate_predictions(y_test, y_pred):
return accuracy_score(y_test, y_pred)
# model.py
import torch
import torch.nn as nn
@ -242,6 +244,8 @@ class IrisClassifier(nn.Module):
outputs = self(X_test)
_, predicted = outputs.max(1)
return predicted.numpy()
# main.py
from utils import load_data, evaluate_predictions
from model import IrisClassifier as Classifier