This commit is contained in:
iperov 2021-08-30 12:57:19 +04:00
parent 6e094d873d
commit f346e35e7f

View File

@ -653,7 +653,7 @@ class AMPModel(ModelBase):
for i in range(bs):
self.last_src_samples_loss.append ( (src_loss[i], target_src[i], target_srcm[i], target_srcm_em[i]) )
self.last_dst_samples_loss.append ( (dst_loss[i], target_dst[i], target_dst[i], target_dstm[i], target_dstm_em[i]) )
self.last_dst_samples_loss.append ( (dst_loss[i], target_dst[i], target_dstm[i], target_dstm_em[i]) )
if len(self.last_src_samples_loss) >= bs*16:
src_samples_loss = sorted(self.last_src_samples_loss, key=operator.itemgetter(0), reverse=True)