diff --git a/codes/trainer/networks.py b/codes/trainer/networks.py index e0733ffe..a68a2ee9 100644 --- a/codes/trainer/networks.py +++ b/codes/trainer/networks.py @@ -37,8 +37,9 @@ def find_registered_model_fns(base_path='models'): found_fns = {} module_iter = pkgutil.walk_packages([base_path]) for mod in module_iter: - if os.getcwd() not in mod.module_finder.path: - continue # I have no idea why this is necessary - I think it's a bug in the latest PyWindows release. + if os.name == 'nt': + if os.getcwd() not in mod.module_finder.path: + continue # I have no idea why this is necessary - I think it's a bug in the latest PyWindows release. if mod.ispkg: EXCLUSION_LIST = ['flownet2'] if mod.name not in EXCLUSION_LIST: