From 50062eaf4097739ec7af97128f33f46e9ccd5aa6 Mon Sep 17 00:00:00 2001 From: shahules786 Date: Tue, 11 Oct 2022 15:10:34 +0530 Subject: [PATCH] rmv inplace operation --- enhancer/models/demucs.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/enhancer/models/demucs.py b/enhancer/models/demucs.py index 5d7e99f..de260a7 100644 --- a/enhancer/models/demucs.py +++ b/enhancer/models/demucs.py @@ -226,7 +226,7 @@ class Demucs(Model): x = x.permute(0, 2, 1) for decoder in self.decoder: skip_connection = encoder_outputs.pop(-1) - x += skip_connection[..., : x.shape[-1]] + x = x + skip_connection[..., : x.shape[-1]] x = decoder(x) if self.hparams.resample > 1: @@ -236,7 +236,8 @@ class Demucs(Model): self.hparams.sampling_rate, ) - return x[..., :length] + out = x[..., :length].clone() + return out def get_padding_length(self, input_length):