Skip to content

Commit a7a613b

Browse files
authored
fix: limiter threshold broadcast error
1 parent 4613c4c commit a7a613b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchcomp/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,5 +197,5 @@ def limiter_gain(
197197
zi = x.new_zeros(x.shape[0])
198198
lt = db2amp(threshold)
199199
x_peak = compressor_core(x.abs(), zi, rt, at)
200-
f = F.relu(1 - lt / x_peak).neg() + 1
200+
f = F.relu(1 - lt[:, None] / x_peak).neg() + 1
201201
return compressor_core(f, torch.ones_like(zi), at, rt)

0 commit comments

Comments
 (0)