From a7963dabbb73abfc665decf2570225b3f8021564 Mon Sep 17 00:00:00 2001 From: niuliling123 <51102941+niuliling123@users.noreply.github.com> Date: Sun, 29 Jan 2023 15:13:25 +0800 Subject: [PATCH] Add sqrt and scale to amp black list for msvsr_reds (#736) * Add sqrt and scale to amp black list for msvsr_reds * Update requirements.txt --- ppgan/models/msvsr_model.py | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ppgan/models/msvsr_model.py b/ppgan/models/msvsr_model.py index 1c394ef..04bdfb4 100644 --- a/ppgan/models/msvsr_model.py +++ b/ppgan/models/msvsr_model.py @@ -118,7 +118,7 @@ class MultiStageVSRModel(BaseSRModel): net.find_unused_parameters = False # put loss computation in amp context - with paddle.amp.auto_cast(enable=True, level=amp_level): + with paddle.amp.auto_cast(enable=True, custom_black_list={'sqrt','scale'}, level=amp_level): output = self.nets['generator'](self.lq) if isinstance(output, (list, tuple)): out_stage2, output = output diff --git a/requirements.txt b/requirements.txt index a8dda25..8b072c6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ tqdm PyYAML>=5.1 scikit-image>=0.14.0 scipy>=1.1.0 -opencv-python +opencv-python <= 4.6.0 imageio==2.9.0 imageio-ffmpeg librosa==0.8.1 -- GitLab