-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Automatic lyric recognition Recipe #4129
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4129 +/- ##
=======================================
Coverage 80.43% 80.43%
=======================================
Files 442 442
Lines 38557 38557
=======================================
Hits 31015 31015
Misses 7542 7542
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
The results seem promising, will merge the recipe first and update the results and pre-trained model in another PR |
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.
LGTM!
@@ -39,13 +39,13 @@ class ApplyKmeans(object): | |||
def __init__(self, km_path): | |||
self.km_model = joblib.load(km_path) | |||
self.nc = self.km_model.cluster_centers_.transpose() | |||
self.nc_norm = (self.nc ** 2).sum(0, keepdims=True) | |||
self.nc_norm = (self.nc**2).sum(0, keepdims=True) |
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.
Can you depress this modification?
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.
I think the issue comes from the newer black version. The results are identical here?
|
||
def __call__(self, x): | ||
if isinstance(x, torch.Tensor): | ||
x = x.cpu().numpy() | ||
probs = ( | ||
(x ** 2).sum(1, keepdims=True) - 2 * np.matmul(x, self.nc) + self.nc_norm | ||
(x**2).sum(1, keepdims=True) - 2 * np.matmul(x, self.nc) + self.nc_norm |
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.
Ditto.
For 11-737 HW3
I will update pre-trained model and results later