-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error while running code #44
Comments
Hi, Thank you very much for your help. I just edit the main branch of the repository to fix this issue. You can install it from here by using Again, thank you for your feedback. |
But still, it shows the same error...Can you pls resolve this? |
can you pls tell in which file you made the correction, because i used only
the source file kvasir classification.
…On Wed, 4 Jan 2023 at 8:10 PM, Labrak Yanis ***@***.***> wrote:
Hi,
Thank you very much for your help. I just edit the main branch of the
repository to fix this issue. You can install it from here by using pip
install --force --upgrade git+https://github.com/qanastek/HugsVision.git
until I got the time to compile the PyPi archive again.
Again, thank you for your feedback.
—
Reply to this email directly, view it on GitHub
<#44 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZSLGB6M7INRP24KIHZMBLLWQWDVFANCNFSM6AAAAAATQ26CXE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
sir, this is still not working.....can u pls correct the issue....because i
am doing one project with this.
…On Wed, Jan 4, 2023 at 8:10 PM Labrak Yanis ***@***.***> wrote:
Hi,
Thank you very much for your help. I just edit the main branch of the
repository to fix this issue. You can install it from here by using pip
install --force --upgrade git+https://github.com/qanastek/HugsVision.git
until I got the time to compile the PyPi archive again.
Again, thank you for your feedback.
—
Reply to this email directly, view it on GitHub
<#44 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZSLGB6M7INRP24KIHZMBLLWQWDVFANCNFSM6AAAAAATQ26CXE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Do this to fix it self.metric = torchmetrics.Accuracy(task="multiclass", num_classes=13)
Do this in VisionClassifierTrainer.py self.metric = torchmetrics.Accuracy(task="multiclass", num_classes=2) |
Thank you @Metal079 and @raseena-tp for your help, and sorry for my late response, I was very busy during past weeks. I push a new commit where I fix the issue and build the new PyPi version 0.75.4. |
i am getting an error while running the below code snippet,
from hugsvision.nnet.VisionClassifierTrainer import VisionClassifierTrainer
from transformers import ViTFeatureExtractor, ViTForImageClassification
trainer = VisionClassifierTrainer(
![error](https://user-images.githubusercontent.com/107262727/210573968-4a147ca6-18e5-487b-a080-dfda89d8beb1.png)
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,
),
)
The text was updated successfully, but these errors were encountered: