-
Notifications
You must be signed in to change notification settings - Fork 849
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
Conversation
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. |
I signed it! |
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
Thanks! It looks good other than the extraneous print statement. Once you remove that I'll merge it. |
@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 |
@LeegleechN hi buddy, please take time to merge this code, thanks so much |
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%.