Loads training and test data.
()
| 131 | |
| 132 | /** Loads training and test data. */ |
| 133 | async loadData() { |
| 134 | this.dataset = await Promise.all([ |
| 135 | loadImages(TRAIN_IMAGES_FILE), loadLabels(TRAIN_LABELS_FILE), |
| 136 | loadImages(TEST_IMAGES_FILE), loadLabels(TEST_LABELS_FILE) |
| 137 | ]); |
| 138 | this.trainSize = this.dataset[0].length; |
| 139 | this.testSize = this.dataset[2].length; |
| 140 | } |
| 141 | |
| 142 | getTrainData() { |
| 143 | return this.getData_(true); |
no test coverage detected