diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-09-16 16:39:27 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-09-16 16:39:27 +0200 |
| commit | d94c415168b20dd43848dd7c8c77c07d8d4528d4 (patch) | |
| tree | a05f0596359891605d9154e98f720903eee28bd9 /app/client/modules/pix2pixhd/pix2pixhd.actions.js | |
| parent | 14652eecb0fb4ebcb14e830504bfb02017bd010e (diff) | |
s00per k3wl 0bj3ct d357rUc7ur1nG
Diffstat (limited to 'app/client/modules/pix2pixhd/pix2pixhd.actions.js')
| -rw-r--r-- | app/client/modules/pix2pixhd/pix2pixhd.actions.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/app/client/modules/pix2pixhd/pix2pixhd.actions.js b/app/client/modules/pix2pixhd/pix2pixhd.actions.js index c1cd2b1..811f913 100644 --- a/app/client/modules/pix2pixhd/pix2pixhd.actions.js +++ b/app/client/modules/pix2pixhd/pix2pixhd.actions.js @@ -200,4 +200,29 @@ export const list_epochs = (checkpoint_name) => (dispatch) => { }, }) }) +} + +export const count_sequence_dataset = (checkpoint_name) => (dispatch) => { + const module = pix2pixhdModule.name + util.allProgress([ + actions.socket.count_directory({ module, dir: 'sequences/' + checkpoint_name + '/' }), + actions.socket.count_directory({ module, dir: 'datasets/' + checkpoint_name + '/train_A/' }), + ], (percent, i, n) => { + console.log('pix2pixhd load progress', i, n) + dispatch({ + type: types.app.load_progress, + progress: { i, n }, + data: { module: 'pix2pixhd' }, + }) + }).then(res => { + const [sequenceCount, datasetCount] = res //, datasets, results, output, datasetUsage, lossReport] = res + console.log(sequenceCount, datasetCount) + dispatch({ + type: types.pix2pixhd.load_results, + results: { + sequenceCount, + datasetCount, + } + }) + }) }
\ No newline at end of file |
