From bd7a7e4dbd0fc5eba00bf40b68f63f56b9ebc908 Mon Sep 17 00:00:00 2001 From: Wenyi Tang Date: Wed, 29 Jul 2020 17:35:42 +0800 Subject: [PATCH 1/3] Fix loading issue when inferring video SR models --- Train/eval.py | 2 +- VSR/Backend/Torch/Framework/Trainer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Train/eval.py b/Train/eval.py index 07955cb..0c03362 100644 --- a/Train/eval.py +++ b/Train/eval.py @@ -56,7 +56,7 @@ def overwrite_from_env(flags): def main(): flags, args = parser.parse_known_args() - opt = Config(depth=-1) + opt = Config(depth=1) for pair in flags._get_kwargs(): opt.setdefault(*pair) overwrite_from_env(opt) diff --git a/VSR/Backend/Torch/Framework/Trainer.py b/VSR/Backend/Torch/Framework/Trainer.py index 14b8286..edf93bb 100644 --- a/VSR/Backend/Torch/Framework/Trainer.py +++ b/VSR/Backend/Torch/Framework/Trainer.py @@ -168,7 +168,7 @@ def infer(self, loader, config, **kwargs): """ v = self.query_config(config, **kwargs) self._restore(config.epoch, v.map_location) - it = loader.make_one_shot_iterator([1, -1, -1, -1], -1) + it = loader.make_one_shot_iterator(v.batch_shape, -1) if hasattr(it, '__len__'): if len(it) == 0: return From ca61f8b809f17e1cc43ea11c5bf9dc4b400d888b Mon Sep 17 00:00:00 2001 From: Wenyi Tang Date: Wed, 29 Jul 2020 17:48:21 +0800 Subject: [PATCH 2/3] [TF] Fix loading issue when inferring VSR models --- VSR/Backend/TF/Framework/Trainer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VSR/Backend/TF/Framework/Trainer.py b/VSR/Backend/TF/Framework/Trainer.py index a9f7aa7..0d1c91e 100644 --- a/VSR/Backend/TF/Framework/Trainer.py +++ b/VSR/Backend/TF/Framework/Trainer.py @@ -365,7 +365,7 @@ def infer(self, loader, config, **kwargs): """ v = self.query_config(config, **kwargs) self._restore() - it = loader.make_one_shot_iterator([1, -1, -1, -1], -1) + it = loader.make_one_shot_iterator(v.batch_shape, -1) if hasattr(it, '__len__'): if len(it): LOG.info('Inferring {} at epoch {}'.format( From 8806bc7cce68cd1b900fb97e1815a62dfcfbebfb Mon Sep 17 00:00:00 2001 From: Wenyi Tang Date: Wed, 29 Jul 2020 17:57:24 +0800 Subject: [PATCH 3/3] Update Changelogs --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12fb2a0..7c093a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -1.0.6.1 +1.0.6.2 ## 1.0.6 ## 2020-07 @@ -7,6 +7,7 @@ - Refactor torch backend models - Add `--caching_dataset` to cache transformed data into memory (ignored when `memory_limit` set). - Fix FastMetrics multi-threads issue +- Fix loading issue when inferring with VSR models ## 1.0.5 ## 2020-05