[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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

use tf rewrite pca operation #69

Merged
merged 2 commits into from
Jun 29, 2018
Merged

use tf rewrite pca operation #69

merged 2 commits into from
Jun 29, 2018

Conversation

ducklingll
Copy link
Contributor
@ducklingll ducklingll commented Jun 8, 2018

When I use the previous feature extraction program, I find that the CPU utilization rate is extremely high. The experimental machine has 56 cores and the cpu occupancy rate is 5600%. Most of them are occupied by the sys kernel, indicating that the cpu is doing a lot of memory swapping.
After debugging, I found that the problem lies in the pca operation, numpy can not use gpu acceleration so that the cpu occupancy rate is higher, and because the memory exchange between the gpu and cpu cause the cpu to do a lot of extra work, so I try to use tensorflow rewrite pca operation, found that the efficiency of feature extraction increased by 27%, cpu utilization from 5600% to 240%.

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

@ducklingll
Copy link
Contributor Author
ducklingll commented Jun 8, 2018

I signed it!

@ducklingll
Copy link
Contributor Author

i double checked, email is match

Feats = Frame_Features[0] - Pca_Mean
Feats = tf.reshape(tf.matmul(tf.reshape(Feats, [1, 2048]), Pca_Eigenvecs), [1024, ])
Feats = tf.divide(Feats, tf.sqrt(Pca_Eigenvals + 1e-4), name='pca_final_feature')
print Feats.name
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

@LeegleechN
Copy link
Collaborator

Thanks! It looks good other than the extraneous print statement. Once you remove that I'll merge it.

@ducklingll
Copy link
Contributor Author

@LeegleechN Thanks for your review! I removed the extraneous print statement, please merge it. BTW, i double checked the cla email, why it is still not work

@ducklingll
Copy link
Contributor Author

@LeegleechN hi buddy, please take time to merge this code, thanks so much

@samihaija samihaija merged commit 2c94ed4 into google:master Jun 29, 2018
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

Successfully merging this pull request may close these issues.

4 participants