ORI-Muchim commited on
Commit
492259d
1 Parent(s): f1e07fc

Update pqmf.py

Browse files
Files changed (1) hide show
  1. pqmf.py +3 -3
pqmf.py CHANGED
@@ -75,15 +75,15 @@ class PQMF(torch.nn.Module):
75
  (-1) ** k * np.pi / 4)
76
 
77
  # convert to tensor
78
- analysis_filter = torch.from_numpy(h_analysis).float().unsqueeze(1).cuda(device)
79
- synthesis_filter = torch.from_numpy(h_synthesis).float().unsqueeze(0).cuda(device)
80
 
81
  # register coefficients as beffer
82
  self.register_buffer("analysis_filter", analysis_filter)
83
  self.register_buffer("synthesis_filter", synthesis_filter)
84
 
85
  # filter for downsampling & upsampling
86
- updown_filter = torch.zeros((subbands, subbands, subbands)).float().cuda(device)
87
  for k in range(subbands):
88
  updown_filter[k, k, 0] = 1.0
89
  self.register_buffer("updown_filter", updown_filter)
 
75
  (-1) ** k * np.pi / 4)
76
 
77
  # convert to tensor
78
+ analysis_filter = torch.from_numpy(h_analysis).float().unsqueeze(1)
79
+ synthesis_filter = torch.from_numpy(h_synthesis).float().unsqueeze(0)
80
 
81
  # register coefficients as beffer
82
  self.register_buffer("analysis_filter", analysis_filter)
83
  self.register_buffer("synthesis_filter", synthesis_filter)
84
 
85
  # filter for downsampling & upsampling
86
+ updown_filter = torch.zeros((subbands, subbands, subbands)).float()
87
  for k in range(subbands):
88
  updown_filter[k, k, 0] = 1.0
89
  self.register_buffer("updown_filter", updown_filter)