From cc5c3eff53cc8c4647da65bfa0b9bb04ed31bfbc Mon Sep 17 00:00:00 2001 From: dohe0342 Date: Mon, 9 Jan 2023 20:21:47 +0900 Subject: [PATCH] from local --- .../incremental_transf/.identity_train.py.swp | Bin 65536 -> 65536 bytes .../ASR/incremental_transf/.model.py.swp | Bin 24576 -> 24576 bytes .../ASR/incremental_transf/model.py | 11 ++++++----- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/egs/librispeech/ASR/incremental_transf/.identity_train.py.swp b/egs/librispeech/ASR/incremental_transf/.identity_train.py.swp index 33277a7f75df771d00cdfac403a95d19eab79628..3449aace706fed396e086cddd85ce0d6592fffa8 100644 GIT binary patch delta 33 ncmZo@U}01MRp3#7lv= z8Hh`PIF*}$i6L-vtHTSf$q~LHllQstPTt_fIyv5xZSz`hb>_(rj94bGu@{=`;IB5h a!I*opuzxUEEY05+OmFrV+z^nI6x@? delta 220 zcmZoTz}RqraYKLrqt50)fz9%~D>xY#O1Kyp7z7v?bS4WLY-cRneA1wob8>?v&*TZF zLYqshCa~7u1gc2ohNzMOQXsI0pMjwah&6%u8Xp703Lst%#3?`=48&eQEDFT?co`TP zfj9w(1Av$th~MxqFq{SA)j(Va#9=_J2gKY!{0wN%P9UBR#GOD~$<4sTkh;0m;RV;` iNbhv!$!qL|CL8$cPG>;Vy~* diff --git a/egs/librispeech/ASR/incremental_transf/model.py b/egs/librispeech/ASR/incremental_transf/model.py index 9f9b39769..61ecb08d1 100644 --- a/egs/librispeech/ASR/incremental_transf/model.py +++ b/egs/librispeech/ASR/incremental_transf/model.py @@ -244,11 +244,12 @@ class Interformer(nn.Module): x: torch.Tensor, x_lens: torch.Tensor, ): - encoder_out, x_lens, pt_layer_outputs = self.pt_encoder(x, - x_lens, - warmup=warmup, - get_layer_output=True - ) + with torch.no_grad(): + encoder_out, x_lens, pt_layer_outputs = self.pt_encoder(x, + x_lens, + warmup=warmup, + get_layer_output=True + ) inter_layer_outputs = self.inter_encoder(pt_layer_outputs) loss = 0