* Constructs a new model and trains it on a dataset pipeline built off of * GAME_GENERATOR_DATASET. The dataset pipeline performs feature calculation * and batching. * @see trainModelUsingFitDataset for training details.
()
| 179 | * @see trainModelUsingFitDataset for training details. |
| 180 | */ |
| 181 | async function trainModelUsingFitDatasetHandler() { |
| 182 | STOP_REQUESTED = false; |
| 183 | const model = createDNNModel(); |
| 184 | model.compile({ |
| 185 | optimizer: 'rmsprop', |
| 186 | loss: 'binaryCrossentropy', |
| 187 | metrics: ['accuracy'], |
| 188 | }); |
| 189 | const dataset = GAME_GENERATOR_DATASET.map(gameToFeaturesAndLabel) |
| 190 | .batch(ui.getBatchSize()); |
| 191 | trainModelUsingFitDataset(model, dataset); |
| 192 | } |
| 193 | |
| 194 | /** |
| 195 | * Applies the model to the manually entered hand value and updates the UI with |
nothing calls this directly
no test coverage detected