uoft-cs/cifar10
Viewer β’ Updated β’ 60k β’ 189k β’ 127
How to use keras-io/supervised-contrastive-learning-cifar10 with TF-Keras:
# Note: 'keras<3.x' or 'tf_keras' must be installed (legacy), and from_pretrained_keras was removed in huggingface_hub 1.0.
# See https://github.com/keras-team/tf-keras for more details.
# !pip install "huggingface_hub<1.0" tf_keras
from huggingface_hub import from_pretrained_keras
model = from_pretrained_keras("keras-io/supervised-contrastive-learning-cifar10")
A classification model trained with Supervised Contrastive Learning (Prannay Khosla et al.). The training procedure was done as seen in the example on keras.io by Khalid Salama.
The model was trained on cifar10, which includes ten classes: airplane, automobile, bird, cat, deer, dog, frog, horse, ship, truck.
The test accuracy after 50 epochs of the model with contrastive learning was 81.06% (opposed to 79.88% without contrastive learning).