From 15752a2225e382d235a123f65b4eb9089590ce17 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 11 Sep 2018 01:14:55 +0200 Subject: deploy bundle --- .../modules/pix2pixhd/views/pix2pixhd.train.js | 212 ++++++++++++--------- 1 file changed, 127 insertions(+), 85 deletions(-) (limited to 'app') diff --git a/app/client/modules/pix2pixhd/views/pix2pixhd.train.js b/app/client/modules/pix2pixhd/views/pix2pixhd.train.js index 4399a60..8ccc7f8 100644 --- a/app/client/modules/pix2pixhd/views/pix2pixhd.train.js +++ b/app/client/modules/pix2pixhd/views/pix2pixhd.train.js @@ -9,7 +9,7 @@ import * as pix2pixhdTasks from '../pix2pixhd.tasks' import { Loading, FileList, FileRow, - Select, SelectGroup, Group, Button, + Select, SelectGroup, Group, Param, Button, TextInput, NumberInput, CurrentTask, TaskList } from '../../../common' @@ -26,12 +26,36 @@ class Pix2PixHDTrain extends Component { super(props) this.handleChange = this.handleChange.bind(this) this.state = { - checkpoint_name: '', + checkpoint_name: 'PLACEHOLDER', epoch: 'latest', augment_name: '', augment_take: 100, augment_make: 20, } + this.short_presets = [ + { augment_take: 100, augment_make: 5 }, + { augment_take: 200, augment_make: 5 }, + { augment_take: 200, augment_make: 3 }, + { augment_take: 50, augment_make: 10 }, + { augment_take: 100, augment_make: 10 }, + { augment_take: 1000, augment_make: 1 }, + ] + this.medium_presets = [ + { augment_take: 30, augment_make: 20 }, + { augment_take: 20, augment_make: 30 }, + { augment_take: 30, augment_make: 30 }, + { augment_take: 50, augment_make: 20 }, + { augment_take: 20, augment_make: 50 }, + { augment_take: 15, augment_make: 70 }, + ] + this.long_presets = [ + { augment_take: 2, augment_make: 100 }, + { augment_take: 2, augment_make: 200 }, + { augment_take: 5, augment_make: 100 }, + { augment_take: 5, augment_make: 200 }, + { augment_take: 10, augment_make: 100 }, + { augment_take: 10, augment_make: 200 }, + ] } componentWillMount(){ const id = this.props.match.params.id || localStorage.getItem('pix2pixhd.last_id') @@ -48,14 +72,7 @@ class Pix2PixHDTrain extends Component { } } componentDidUpdate(prevProps, prevState){ - if (! prevProps.pix2pixhd.data && this.props.pix2pixhd.data) { - console.log('set checkpoint_name') - this.setState({ - checkpoint_name: this.props.pix2pixhd.data.sequences[0].name, - epoch: 'latest' - }) - } - else if (prevState.checkpoint_name !== this.state.checkpoint_name) { + if (prevState.checkpoint_name !== this.state.checkpoint_name) { this.setState({ epoch: 'latest' }) this.props.actions.list_epochs(this.state.checkpoint_name) } @@ -95,91 +112,116 @@ class Pix2PixHDTrain extends Component { // console.log('state', this.props.pix2pixhd.data.epochs) // console.log(this.state.checkpoint_name, this.state.epoch) - console.log(queue) + // console.log(queue) return (
-
+

pix2pixhd training

-
- - + + + + + + ))} +
+ + +
+ {this.medium_presets.map(p => ( + + ))} +
+ + +
+ {this.long_presets.map(p => ( + + ))} +
+ + - -
+
queue.tasks[id])} sort="date asc" /> - } +
) -- cgit v1.2.3-70-g09d2