Downloads · 30 days
0
Zakir101/AIorNot_Vision_Model
AIorNot_Vision_Model is a machine learning model from Zakir101. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
This is a machine learning model trained on AI data using the EfficientNet architecture in PyTorch. The model achieved an accuracy of 97.314% on the validation set.
Downloads · 30 days
0
Access
Public
Updated Mar 17, 2023
Repo size
148 MB
Likes
0
Public
Click a slice to open those files.
.tar148 MB · 99%
From the Hugging Face model README
This is a machine learning model trained on AI data using the EfficientNet architecture in PyTorch. The model achieved an accuracy of 97.314% on the validation set.
To use the model, simply import it and load the weights:
import torch
from efficientnet_model import EfficientNetModel
# create an instance of the model
model = EfficientNetModel()
# load the weights
model.load_state_dict(torch.load("path/to/weights.pth"))
Once the weights are loaded, you can use the model for inference on new data:
# load your data
data = ...
# preprocess the data
preprocessed_data = ...
# move the data to GPU if available
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
preprocessed_data = preprocessed_data.to(device)
# make a prediction
with torch.no_grad():
prediction = model(preprocessed_data)
# print the predicted class
predicted_class = torch.argmax(prediction, dim=1)
print(predicted_class)
Training
The model was trained on a labeled dataset of AI data using the EfficientNet architecture in PyTorch. The data was split into a training set and a validation set, with a 80/20 split. The model was trained using the Adam optimizer with a learning rate of 0.001 and categorical cross-entropy loss.
To train the model on your own dataset, you can use the train.py script provided in this repository. Simply modify the script to load your own data and configure the training parameters.
Evaluation
The model achieved an accuracy of 97.314% on the validation set. To reproduce this result, you can use the evaluate.py script provided in this repository. Simply modify the script to load your own data and configure the evaluation parameters.
