@torch.no_grad()
def scaled_mask(self, noisy, inference_args):
    noisy_complex = self.torch_stft(noisy)
    (noisy_mag, noisy_phase) = mag_phase(noisy_complex)
    noisy_mag = noisy_mag.unsqueeze(1)
    scaled_mask = self.model(noisy_mag)
    scaled_mask = scaled_mask.permute(0, 2, 3, 1)
    enhanced_complex = (noisy_complex * scaled_mask)
    enhanced = self.torch_istft(enhanced_complex, length=noisy.size((- 1)), use_mag_phase=False)
    enhanced = enhanced.detach().squeeze(0).cpu().numpy()
    return enhanced
@torch.no_grad()
def scaled_mask(self, noisy, inference_args):
    noisy_complex = self.torch_stft(noisy)
    (noisy_mag, noisy_phase) = mag_phase(noisy_complex)
    noisy_mag = noisy_mag.unsqueeze(1)
    scaled_mask = self.model(noisy_mag)
    scaled_mask = scaled_mask.permute(0, 2, 3, 1)
    enhanced_complex = (noisy_complex * scaled_mask)
    enhanced = self.torch_istft(enhanced_complex, length=noisy.size((- 1)), use_mag_phase=False)
    enhanced = enhanced.detach().squeeze(0).cpu().numpy()
    return enhanced