HoneyTian commited on
Commit
cf7ad48
·
1 Parent(s): b7994eb

add frcrn model

Browse files
toolbox/torchaudio/models/frcrn/unet.py CHANGED
@@ -306,6 +306,7 @@ class UNet(nn.Module):
306
  :return:
307
  """
308
  x = inputs
 
309
 
310
  # go down
311
  xs = list()
@@ -315,19 +316,18 @@ class UNet(nn.Module):
315
  xs.append(x)
316
  # print(f"x: {x.shape}")
317
  x = encoder_layer.forward(x)
318
- # print(f"x: {x.shape}")
319
  xs_se.append(x)
320
 
321
  # x shape: [b, c, 1, t', 2]
322
  x = self.fsmn.forward(x)
323
  # x shape: [b, c, 1, t', 2]
324
- # print(f"fsmn")
325
 
326
  p = x
327
  for i, decoder_layers in enumerate(self.decoder_layers):
328
- # print(f"x: {x.shape}")
329
  p = decoder_layers.forward(p)
330
- # print(f"p: {p.shape}")
331
  if i == self.model_length - 1:
332
  break
333
  p = torch.cat(tensors=[p, xs_se[self.model_length - 1 - i]], dim=1)
 
306
  :return:
307
  """
308
  x = inputs
309
+ print(f"inputs: {x.shape}")
310
 
311
  # go down
312
  xs = list()
 
316
  xs.append(x)
317
  # print(f"x: {x.shape}")
318
  x = encoder_layer.forward(x)
319
+ print(f"x: {x.shape}")
320
  xs_se.append(x)
321
 
322
  # x shape: [b, c, 1, t', 2]
323
  x = self.fsmn.forward(x)
324
  # x shape: [b, c, 1, t', 2]
325
+ print(f"fsmn")
326
 
327
  p = x
328
  for i, decoder_layers in enumerate(self.decoder_layers):
 
329
  p = decoder_layers.forward(p)
330
+ print(f"p: {p.shape}")
331
  if i == self.model_length - 1:
332
  break
333
  p = torch.cat(tensors=[p, xs_se[self.model_length - 1 - i]], dim=1)