diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-08-30 12:11:21 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-08-30 12:11:21 +0200 |
| commit | 9b896ff0e91393e2aab9126b64efcc9c9e00c519 (patch) | |
| tree | 799a6647112af5147e26770e90c63c1ef243f776 /rpc | |
| parent | fd27ddc1b705cb5271e8b32ea1ea7436ffd4c038 (diff) | |
epochs
Diffstat (limited to 'rpc')
| -rw-r--r-- | rpc/listener.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rpc/listener.py b/rpc/listener.py index c54dc89..87eea37 100644 --- a/rpc/listener.py +++ b/rpc/listener.py @@ -7,13 +7,13 @@ from img_ops import process_image def list_checkpoints(payload): print("> list checkpoints") - return sorted([f.split('/')[3] for f in glob.glob('./checkpoints/' + payload + '/*/latest_net_G.pth')]) + return sorted([f.split('/')[3] for f in glob.glob(os.path.join('./checkpoints/', payload, '/*/latest_net_G.pth'))]) def list_epochs(path): print("> list epochs for {}".format(path)) if not os.path.exists(os.path.join('./checkpoints/', path)): return "not found" - return sorted([f.split('/')[4].replace('_net_G.pth','') for f in glob.glob('./checkpoints/' + path + '/*_net_G.pth')]) + return sorted([os.path.basename(f).replace('_net_G.pth', '') for f in glob.glob(os.path.join('./checkpoints/', path, '/*_net_G.pth'))]) def list_sequences(module): print("> list sequences") |
