diff options
| author | Taras Sereda <taras.sereda@ring.com> | 2017-04-27 17:42:42 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-27 17:42:42 +0300 |
| commit | c1b6f721846b383f5196040107159984c68fc5d5 (patch) | |
| tree | c2ca4c578e0d71537d4da1600c9c2bea6af92af7 /options/base_options.py | |
| parent | 71379036e7d25ba535899bd9b1fc5cad4912b495 (diff) | |
Update base_options.py
more pythonic way to create dictionary from opts
Diffstat (limited to 'options/base_options.py')
| -rw-r--r-- | options/base_options.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/options/base_options.py b/options/base_options.py index bce0b9c..cce6aae 100644 --- a/options/base_options.py +++ b/options/base_options.py @@ -52,9 +52,7 @@ class BaseOptions(): if id >= 0: self.opt.gpu_ids.append(id) - args = dict((name, getattr(self.opt, name)) for name in dir(self.opt) - if not name.startswith('_')) - + args = vars(self.opt) print('------------ Options -------------') for k, v in sorted(args.items()): |
