You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#self.window_ = torch.hamming_window(self.kernel_size)n_lin=torch.linspace(0, (self.kernel_size/2)-1, steps=int((self.kernel_size/2))) # computing only half of the windowself.window_=0.54-0.46*torch.cos(2*math.pi*n_lin/self.kernel_size);
Could it be replaced instead by self.window_ = torch.hamming_window(kernel_size)[:kernel_size // 2]? Or should it be self.window_ = torch.hamming_window(kernel_size, periodic = False)[:kernel_size // 2]?
There is some divergence. Is it only because of numerical reasons? Or maybe some boundary effects of torch.linspace? Here's PyTorch source code for: torch.hamming_window
https://github.com/mravanelli/SincNet/blob/master/dnn_models.py#L106-L108 :
Could it be replaced instead by
self.window_ = torch.hamming_window(kernel_size)[:kernel_size // 2]
? Or should it beself.window_ = torch.hamming_window(kernel_size, periodic = False)[:kernel_size // 2]
?There is some divergence. Is it only because of numerical reasons? Or maybe some boundary effects of torch.linspace? Here's PyTorch source code for:
torch.hamming_window
The text was updated successfully, but these errors were encountered: