Skip to content

Commit

Permalink
Merge pull request #119 from LoSealL/dev
Browse files Browse the repository at this point in the history
Fix loading issue when inferring video SR models
  • Loading branch information
LoSealL authored Jul 29, 2020
2 parents 9d0e38e + 8806bc7 commit 4c86e49
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
1.0.6.1
1.0.6.2

## 1.0.6
## 2020-07
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Train/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion VSR/Backend/TF/Framework/Trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion VSR/Backend/Torch/Framework/Trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4c86e49

Please sign in to comment.