diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-06-05 22:43:09 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-06-05 22:43:09 +0200 |
| commit | 458663d008e0447f3db0f3a1d3f8750cccc8b62e (patch) | |
| tree | 66fbf8e4f6df847145a17e87df7d6452a7de6b20 /app/client/modules/pix2pix/pix2pix.reducer.js | |
| parent | 5c018b3f2c2c47371546d210240836057d1ea5bb (diff) | |
pix2pix datasets in full effect
Diffstat (limited to 'app/client/modules/pix2pix/pix2pix.reducer.js')
| -rw-r--r-- | app/client/modules/pix2pix/pix2pix.reducer.js | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/app/client/modules/pix2pix/pix2pix.reducer.js b/app/client/modules/pix2pix/pix2pix.reducer.js index fbd38d1..10135a5 100644 --- a/app/client/modules/pix2pix/pix2pix.reducer.js +++ b/app/client/modules/pix2pix/pix2pix.reducer.js @@ -1,39 +1,20 @@ import types from '../../types' +import datasetReducer from '../../dataset/dataset.reducer' const pix2pixInitialState = { loading: true, + progress: { i: 0, n: 0 }, error: null, - folders: [], folder_id: 0, data: null, - lossReport: null, } const pix2pixReducer = (state = pix2pixInitialState, action) => { - // console.log(action.type) - switch(action.type) { - case types.pix2pix.init: - return { - ...state, - loading: false, - data: action.data, - } - - case types.socket.connect: - return { - ...state, - } - - case types.task.task_begin: - return { - ...state, - } - - case types.task.task_finish: - return { - ...state, - } + if (action.data && action.data.module === 'pix2pix') { + state = datasetReducer(state, action) + } + switch (action.type) { default: return state } |
