diff options
Diffstat (limited to 'app/client/common')
| -rw-r--r-- | app/client/common/augmentationGrid.component.js | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/app/client/common/augmentationGrid.component.js b/app/client/common/augmentationGrid.component.js index 536136a..af77f6c 100644 --- a/app/client/common/augmentationGrid.component.js +++ b/app/client/common/augmentationGrid.component.js @@ -10,28 +10,36 @@ export default class AugmentationGrid extends Component { x: 0, y: 0, sum: 0, } render() { + let { + make, take, checkpoint, + onTrain, onAugment, + } = this.props + let { + x, y, sum + } = this.state let rows = [] return ( <Group className='augmentationGrid'> <ButtonGrid - x={this.props.make} - y={this.props.take} + x={make} + y={take} max={5000} onHover={(x, y) => this.setState({ x, y })} onClick={(x, y) => { - this.setState({ sum: this.state.sum + x * y }) - this.props.onAugment(y, x) + this.setState({ sum: sum + x * y }) + onAugment(y, x) }} /> - <Param title='Take'>{this.state.y}</Param> - <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> + <Param title='Name'>{checkpoint.name}</Param> + <Param title='Take'>{y}</Param> + <Param title='Make'>{x}</Param> + <Param title='Will add to dataset'>{x * y}</Param> + <Param title='Total added this epoch'>{sum}</Param> + <Param title='Sequence length'>{checkpoint.sequenceCount}</Param> + <Param title='Dataset size'>{checkpoint.datasetCount}</Param> <Button onClick={() => { this.setState({ sum: 0 }) - this.props.onTrain() + onTrain() }}>Train</Button> </Group> ) |
