From c1b6f721846b383f5196040107159984c68fc5d5 Mon Sep 17 00:00:00 2001 From: Taras Sereda Date: Thu, 27 Apr 2017 17:42:42 +0300 Subject: Update base_options.py more pythonic way to create dictionary from opts --- options/base_options.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'options/base_options.py') 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()): -- cgit v1.2.3-70-g09d2