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

How to disable this user warning? #4

Closed
lucasjinreal opened this issue Jan 28, 2019 · 4 comments
Closed

How to disable this user warning? #4

lucasjinreal opened this issue Jan 28, 2019 · 4 comments

Comments

@lucasjinreal
Copy link

When run detector to show result on detect result, there is an warning:

/align/get_nets.py:70: UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument.
  a = F.softmax(a)
detector.py:82: UserWarning: volatile was removed and now has no effect. Use `with torch.no_grad():` instead.
  img_boxes = Variable(torch.FloatTensor(img_boxes), volatile = True)

@ZhaoJ9014
Copy link
Owner

Hi, thank you for your question. We did not set the specific dimension for "F.softmax" at Line 70 in /align/get_nets.py, which has been deprecated. You can optionally include a "dim=X" ("X" is the output neuron number) to avoid this warning. For the second warning, you can remove ", volatile = True" from "img_boxes = Variable(torch.FloatTensor(img_boxes), volatile = True)" at Line 82 in /align/detector.py and put the relevant code within "with torch.no_grad():". Hope this helps:)

@lucasjinreal
Copy link
Author

@ZhaoJ9014 Thanks for your dedicate reply. BTW, how much MTCNN fps runs on CPU for now? Haven't test on a video but image seems fast. And is there any training process included to train a MTCNN face detector?

@ZhaoJ9014
Copy link
Owner

Welcome. 1) We haven't performed video test on CPU, but the speed should be also satisfactory. 2) Currently, we did not include the training process due to a common issue that the re-implementations can hardly reproduce the results reported by the MTCNN original paper. We thus choose to transfer the weights and implement the inference process. Please kindly inform us if you get any new results by performing video test on CPU or reproducing the reported results with self-training in the future.

@knotgrass
Copy link

Hi, thank you for your question. We did not set the specific dimension for "F.softmax" at Line 70 in /align/get_nets.py, which has been deprecated. You can optionally include a "dim=X" ("X" is the output neuron number) to avoid this warning.

specifically in this case, how many output neuron number of this model.
I using Onet, Pnet and Rnet
Btw, i don't see any flatten layer or linear layer in Onet, Pnet or Rnet
Thanks you

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

3 participants