-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
i am getting an error while running the below code snippet,
from hugsvision.nnet.VisionClassifierTrainer import VisionClassifierTrainer
from transformers import ViTFeatureExtractor, ViTForImageClassification
trainer = VisionClassifierTrainer(
model_name = "MyKvasirV2Model",
train = train,
test = test,
output_dir = "./out/",
max_epochs = 1,
batch_size = 32, # On RTX 2080 Ti
lr = 2e-5,
fp16 = True,
model = ViTForImageClassification.from_pretrained(
huggingface_model,
num_labels = len(label2id),
label2id = label2id,
id2label = id2label
),
feature_extractor = ViTFeatureExtractor.from_pretrained(
huggingface_model,
),
)

Metadata
Metadata
Assignees
Labels
No labels