From 26b80e09cd64d5bb5b40bc7872aff397d9cc80ea Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 6 Jun 2018 22:45:25 +0200 Subject: play frames --- app/client/modules/pix2pix/index.js | 6 ++-- app/client/modules/pix2pix/views/pix2pix.live.js | 46 ++++++++++++++++++++---- 2 files changed, 43 insertions(+), 9 deletions(-) (limited to 'app/client/modules/pix2pix') diff --git a/app/client/modules/pix2pix/index.js b/app/client/modules/pix2pix/index.js index 076fef9..f3a4050 100644 --- a/app/client/modules/pix2pix/index.js +++ b/app/client/modules/pix2pix/index.js @@ -12,8 +12,8 @@ function router () { return (
- - + +
) @@ -22,7 +22,7 @@ function router () { function links(){ return ( - datasets + sequences train process live diff --git a/app/client/modules/pix2pix/views/pix2pix.live.js b/app/client/modules/pix2pix/views/pix2pix.live.js index eebb364..76b6727 100644 --- a/app/client/modules/pix2pix/views/pix2pix.live.js +++ b/app/client/modules/pix2pix/views/pix2pix.live.js @@ -44,6 +44,12 @@ class Pix2PixLive extends Component { const frame = Math.floor(percentage * (parseInt(this.props.frame.sequence_len) || 1) + 1) this.props.actions.seek(frame) } + start(){ + // + } + kill(){ + // + } togglePlaying(){ if (this.props.opt.processing) { this.props.actions.pause() @@ -99,12 +105,7 @@ class Pix2PixLive extends Component { value={(this.props.frame.sequence_i || 0) / (this.props.frame.sequence_len || 1)} onChange={this.seek} /> - + {this.renderRestartButton()} + ) + } + if (this.props.runner.gpu.task.module !== 'pix2pix') { + return ( + + ) + } + if (! this.props.opt.processing) { + return ( + + ) + } + return ( + + ) + } } function timeInSeconds(n){ return (n / 10).toFixed(1) + ' s.' @@ -244,6 +277,7 @@ const mapStateToProps = state => ({ checkpoints: state.live.checkpoints, epochs: state.live.epochs, sequences: state.live.sequences, + runner: state.system.runner, }) const mapDispatchToProps = (dispatch, ownProps) => ({ -- cgit v1.2.3-70-g09d2