-
Notifications
You must be signed in to change notification settings - Fork 68
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
How to do the implementation with my Dataset #5
Comments
@rishikksh20 @aarti9
Please help me out. |
Sure Vaibhav, we can help you with that. Send us your email id, we will
reach out to help debug the issue
…On Mon, Aug 9, 2021, 2:38 AM vaibhavsah, ***@***.***> wrote:
@rishikksh20 <https://github.com/rishikksh20> @aarti9
<https://github.com/aarti9>
In my dataset I have 6 classes for identification. So on using the code in
develop branch, I am getting an error for no support for multi-class
classification by the loss function. Please help me out there.
[image: Screenshot 2021-08-09 at 12 02 17 PM]
<https://user-images.githubusercontent.com/12396290/128668163-8de721da-6de9-4051-ac0b-ce9c85b4d542.png>
RuntimeError: multi-target not supported at
/pytorch/aten/src/THCUNN/generic/ClassNLLCriterion.cu:15
Please help me out.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABHJ4SCJK7PJKJRL7VQPDN3T35ZXDANCNFSM5BXG47BA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
Thanks @aarti9. You may connect with me on [email protected] |
As the code was not working, after a bit research, I tried updating the loss function calculation as Where class_weights are calculated as: But this also didn't work. It seems there is some issue in the dimensions of target variable in train_epoch function. Please help me fix it. |
You can try loss_func = nn.CrossEntropyLoss()
I can check train_epoch code tomorrow
…On Mon, Aug 9, 2021, 3:02 AM vaibhavsah, ***@***.***> wrote:
As the code was not working, after a bit research, I tried updating the
loss function calculation as
loss_func = nn.CrossEntropyLoss(weight=class_weights.to(device))
Where class_weights are calculated as:
tensor([0.0045, 0.0042, 0.0048, 0.0038, 0.0070, 0.0065])
But this also didn't work. It seems there is some issue in the dimensions
of target variable in train_epoch function. Please help me fix it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABHJ4SFYBKWYTICGXFYW5GDT354Q7ANCNFSM5BXG47BA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
Earlier I used that only, which was already there in your code. The thing is that I have made some changes in the Dataset Preprocessing to read the videos from the dataframe. But not sure if that is causing the errors.
|
This is the file I have created on Colab. Colab Sheet |
@aarti9 I changed my approach. Divided my test and train data in folders and used your develop branch from fresh. But a new issue arrived. It's saying that ViViT has no attribute evaluate. What's so strange here ? Please acknowledge.
|
@aarti9 Instead of model.evaluate(), I ran evaluate. That did the trick to run the code. |
@vaibhavsah Hello, have u fixed the problem of the 21.09% accuracy? Also, I faced some issues about training vivit on custom dataset, could u please share the Colab sheet again, the link has broken. Thanks. |
Sorry I couldn't do that. Had to work with another models.
Vaibhav Sah,
Phone: +91-9309273243 +91-7976494224*|* ***@***.***
***@***.***>
…On Wed, Oct 27, 2021 at 11:49 AM Gemsarah ***@***.***> wrote:
@vaibhavsah <https://github.com/vaibhavsah> Hello, have u fixed the
problem of the 21.09% accuracy? Also, I faced some issues about training
vivit on custom dataset, could u please share the Colab sheet again, the
link has broken. Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC6SOAUY2X4CC6IUS2V2DA3UI6KVNANCNFSM5BXG47BA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
@2000222 Sorry, even I couldn't find the solution. Had to switch to basic Transformer model |
Hi
I am a newbie to PyTorch. I want to use this model for my thesis. Can you please help me in explaining how to run this code on my dataset. Can you please update the Readme file with simple steps to run and evaluate the model on custom dataset.
The text was updated successfully, but these errors were encountered: