diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-09-16 16:46:37 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-09-16 16:46:37 +0200 |
| commit | ccc9f74102e4432ac8341395174b0004b1435e32 (patch) | |
| tree | 144ce6d06394f219048d3152fe3f0109bb66c83d /app | |
| parent | d94c415168b20dd43848dd7c8c77c07d8d4528d4 (diff) | |
surface sequence/dataset count...
Diffstat (limited to 'app')
| -rw-r--r-- | app/client/common/augmentationGrid.component.js | 2 | ||||
| -rw-r--r-- | app/client/common/taskList.component.js | 2 | ||||
| -rw-r--r-- | app/client/modules/pix2pixhd/pix2pixhd.actions.js | 7 | ||||
| -rw-r--r-- | app/client/modules/pix2pixhd/pix2pixhd.reducer.js | 10 | ||||
| -rw-r--r-- | app/client/modules/pix2pixhd/views/pix2pixhd.train.js | 2 | ||||
| -rw-r--r-- | app/client/types.js | 2 |
6 files changed, 20 insertions, 5 deletions
diff --git a/app/client/common/augmentationGrid.component.js b/app/client/common/augmentationGrid.component.js index 69bdc8a..536136a 100644 --- a/app/client/common/augmentationGrid.component.js +++ b/app/client/common/augmentationGrid.component.js @@ -27,6 +27,8 @@ export default class AugmentationGrid extends Component { <Param title='Make'>{this.state.x}</Param> <Param title='Will add to dataset'>{this.state.x * this.state.y}</Param> <Param title='Total added this epoch'>{this.state.sum}</Param> + <Param title='Sequence length'>{this.state.checkpoint.sequenceCount}</Param> + <Param title='Dataset size'>{this.state.checkpoint.datasetCount}</Param> <Button onClick={() => { this.setState({ sum: 0 }) this.props.onTrain() diff --git a/app/client/common/taskList.component.js b/app/client/common/taskList.component.js index 710753f..c1ed38a 100644 --- a/app/client/common/taskList.component.js +++ b/app/client/common/taskList.component.js @@ -27,7 +27,7 @@ class TaskList extends Component { const task = pair[1] const { dataset } = task let dataset_link, label = dataset; - console.log(task) + // console.log(task) switch (task.activity) { case 'train': if (task.epoch === 0) { diff --git a/app/client/modules/pix2pixhd/pix2pixhd.actions.js b/app/client/modules/pix2pixhd/pix2pixhd.actions.js index 811f913..a17eeab 100644 --- a/app/client/modules/pix2pixhd/pix2pixhd.actions.js +++ b/app/client/modules/pix2pixhd/pix2pixhd.actions.js @@ -202,7 +202,7 @@ export const list_epochs = (checkpoint_name) => (dispatch) => { }) } -export const count_sequence_dataset = (checkpoint_name) => (dispatch) => { +export const count_dataset = (checkpoint_name) => (dispatch) => { const module = pix2pixhdModule.name util.allProgress([ actions.socket.count_directory({ module, dir: 'sequences/' + checkpoint_name + '/' }), @@ -218,8 +218,9 @@ export const count_sequence_dataset = (checkpoint_name) => (dispatch) => { const [sequenceCount, datasetCount] = res //, datasets, results, output, datasetUsage, lossReport] = res console.log(sequenceCount, datasetCount) dispatch({ - type: types.pix2pixhd.load_results, - results: { + type: types.pix2pixhd.load_dataset_count, + data: { + name: checkpoint_name, sequenceCount, datasetCount, } diff --git a/app/client/modules/pix2pixhd/pix2pixhd.reducer.js b/app/client/modules/pix2pixhd/pix2pixhd.reducer.js index c3d52a3..5a2afc0 100644 --- a/app/client/modules/pix2pixhd/pix2pixhd.reducer.js +++ b/app/client/modules/pix2pixhd/pix2pixhd.reducer.js @@ -8,6 +8,11 @@ const pix2pixhdInitialState = { folder_id: 0, data: null, results: null, + checkpoint: { + name: '', + sequenceCount: 0, + datasetCount: 0, + } } const pix2pixhdReducer = (state = pix2pixhdInitialState, action) => { @@ -21,6 +26,11 @@ const pix2pixhdReducer = (state = pix2pixhdInitialState, action) => { ...state, results: action.results, } + case types.pix2pixhd.load_dataset_count: + return { + ...state, + checkpoint: action.data, + } case types.file.destroy: console.log('file destroy', state.results) return { diff --git a/app/client/modules/pix2pixhd/views/pix2pixhd.train.js b/app/client/modules/pix2pixhd/views/pix2pixhd.train.js index 05ad638..06caa5a 100644 --- a/app/client/modules/pix2pixhd/views/pix2pixhd.train.js +++ b/app/client/modules/pix2pixhd/views/pix2pixhd.train.js @@ -52,6 +52,7 @@ class Pix2PixHDTrain extends Component { if (prevState.checkpoint_name !== this.state.checkpoint_name) { this.setState({ epoch: 'latest' }) this.props.actions.list_epochs(this.state.checkpoint_name) + this.props.actions.count_dataset(this.state.checkpoint_name) } } handleChange(name, value){ @@ -152,6 +153,7 @@ class Pix2PixHDTrain extends Component { </Group> <Group title='Augmentation Grid'> <AugmentationGrid + checkpoint={this.props.pix2pixhd.checkpoint} take={[1,2,3,4,5,10,15,20,25,50,75,100,200,300,400,500,1000]} make={[1,2,3,4,5,10,15,20,25,50,75,100,200,]} onAugment={(augment_take, augment_make) => { diff --git a/app/client/types.js b/app/client/types.js index b551a3c..22211dd 100644 --- a/app/client/types.js +++ b/app/client/types.js @@ -110,7 +110,7 @@ export default { 'init', 'set_folder' ]), pix2pixhd: with_type('pix2pixhd', [ - 'init', 'set_folder', 'load_results' + 'init', 'set_folder', 'load_results', 'load_dataset_count' ]), pix2wav: with_type('pix2wav', [ 'init', 'set_folder' |
