HoneyTian commited on
Commit
602ffc9
·
1 Parent(s): 169d6d6
toolbox/torchaudio/modules/utils/ema.py CHANGED
@@ -66,6 +66,7 @@ class ErbEMA(nn.Module, EMANumpy):
66
  # erb_feat shape: [b, c, t, f]
67
  if state is None:
68
  state = self.make_erb_norm_state()
 
69
  state = state.clone()
70
 
71
  for j in range(t):
@@ -118,6 +119,7 @@ class SpecEMA(nn.Module, EMANumpy):
118
  # feat_spec shape: [b, 2, t, df_bins]
119
  if state is None:
120
  state = self.make_spec_norm_state()
 
121
  state = state.clone()
122
 
123
  for j in range(t):
 
66
  # erb_feat shape: [b, c, t, f]
67
  if state is None:
68
  state = self.make_erb_norm_state()
69
+ state = state.to(feat_erb.device)
70
  state = state.clone()
71
 
72
  for j in range(t):
 
119
  # feat_spec shape: [b, 2, t, df_bins]
120
  if state is None:
121
  state = self.make_spec_norm_state()
122
+ state = state.to(feat_spec.device)
123
  state = state.clone()
124
 
125
  for j in range(t):