Skip to content
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 applying your model #24

Closed
utkarsh-tyagi opened this issue Dec 27, 2021 · 13 comments
Closed

Error while applying your model #24

utkarsh-tyagi opened this issue Dec 27, 2021 · 13 comments

Comments

@utkarsh-tyagi
Copy link

utkarsh-tyagi commented Dec 27, 2021

I have applied your pretrained model on some audio files but it give me error :

RuntimeError: Calculated padded input size per channel: (3 x 752). Kernel size: (9 x 3). Kernel size can't be greater than actual input size

Do you know what is the reason?

@yzyouzhang
Copy link
Owner

Thank you for your question. Could you please let me know the shape of the input feature you feed into the model? I am not sure if you preprocess the raw audio properly.

@yzyouzhang
Copy link
Owner

In this repo, we provided the MATLAB code for preprocessing. If you prefer to use Python, please refer to preprocess.py in our new repo for the recent work https://github.com/yzyouzhang/Empirical-Channel-CM. Thanks.

@utkarsh-tyagi
Copy link
Author

utkarsh-tyagi commented Dec 28, 2021

torch.Size([60, 750])

Please find my notebook file what i am doing.

How can i connect with you? email id?
notebook_air_2.zip

@utkarsh-tyagi
Copy link
Author

@yzyouzhang Also i am not able to train the model from scratch , it give me error:
Batch size = 2
GPU : RTX 2060 6 GB

RuntimeError: CUDA out of memory. Tried to allocate 60.00 MiB (GPU 0; 6.00 GiB total capacity; 4.49 GiB already allocated; 0 bytes free; 4.52 GiB reserved in total by PyTorch)

@yzyouzhang
Copy link
Owner

torch.Size([60, 750])

Please find my notebook file what i am doing.

How can i connect with you? email id? notebook_air_2.zip

The feature size should be [B, 1, 60, 750].
I checked your code. You have ResNet(1, 16) when you set up the model. It should be ResNet(3, 256) if you want to use my pretrained model.

@yzyouzhang
Copy link
Owner

@yzyouzhang Also i am not able to train the model from scratch , it give me error: Batch size = 2 GPU : RTX 2060 6 GB

RuntimeError: CUDA out of memory. Tried to allocate 60.00 MiB (GPU 0; 6.00 GiB total capacity; 4.49 GiB already allocated; 0 bytes free; 4.52 GiB reserved in total by PyTorch)

In my case, I use RTX 1080 Ti 11GB. I can load with batch size 64. So I think batch size 2 should be totally OK for your device. Have you made sure there are no other processes occupying the GPU memory?

@utkarsh-tyagi
Copy link
Author

@yzyouzhang how can i convert my feature size (60,750) to [B, 1, 60, 750].

what is B and 1 means?

@utkarsh-tyagi
Copy link
Author

@yzyouzhang i checked it again , no other process occupying my gpu memory.

could you please share your id or zoom id for further contact to solve this issue?

@utkarsh-tyagi
Copy link
Author

@yzyouzhang what threshold score you have set for real and fake samples?
score = F.softmax(lfcc_outputs)[:, 0]
score

@yzyouzhang
Copy link
Owner

yzyouzhang commented Dec 29, 2021

@yzyouzhang how can i convert my feature size (60,750) to [B, 1, 60, 750].

what is B and 1 means?

B is the batch size, 1 is the number of channels for CNN.

@yzyouzhang
Copy link
Owner

@yzyouzhang what threshold score you have set for real and fake samples? score = F.softmax(lfcc_outputs)[:, 0] score

We do not need a threshold to calculate EER. If you want to classify samples into two classes, you can choose a value between the r1 and r2 of the OCSoftmax.

@yzyouzhang
Copy link
Owner

@yzyouzhang i checked it again , no other process occupying my gpu memory.

could you please share your id or zoom id for further contact to solve this issue?

Please contact yzyouzhang@gmail.com for further zoom discussions. Thanks.

@utkarsh-tyagi
Copy link
Author

ok thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants