harritaylor / torchvggish

Pytorch port of Google Research's VGGish model used for extracting audio features.
Apache License 2.0
377 stars 68 forks source link

PCA post-processing removes gradient from embeddings #4

Closed harritaylor closed 5 years ago

harritaylor commented 5 years ago

As the tensorflow code uses numpy to PCA the output embeddings, it is not possible to take advantage of this when adding torch-vggish to other networks (the usecase for this is relatively small). It would be useful to reimplement the PCA algorithm so that it can operate on Torch tensors.

harritaylor commented 5 years ago

https://github.com/harritaylor/torchvggish/commit/4bb86592ff8df6a1bdb00de7157d699f516bd130 Addresses this.