-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
I noticed that the following code in the fordward method does not depend on input x. Is there a reason this is not run once, and only once, during model init? Seems like unneccesary overhead to run it during each fwd pass, or am i missing something?
for i in range(len(self.mel)-1):
fmin=self.mel[i]
fmax=self.mel[i+1]
hHigh=(2*fmax/self.sample_rate)*np.sinc(2*fmax*self.hsupp/self.sample_rate)
hLow=(2*fmin/self.sample_rate)*np.sinc(2*fmin*self.hsupp/self.sample_rate)
hideal=hHigh-hLow
self.band_pass[i,:]=Tensor(np.hamming(self.kernel_size))*Tensor(hideal)
band_pass_filter=self.band_pass.to(self.device)
self.filters = (band_pass_filter).view(self.out_channels, 1, self.kernel_size)
Metadata
Metadata
Assignees
Labels
No labels