MCPcopy Create free account
hub / github.com/tensorflow/tfjs-examples / loadData

Method loadData

mnist-node/data.js:133–140  ·  view source on GitHub ↗

Loads training and test data.

()

Source from the content-addressed store, hash-verified

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);

Callers 1

runFunction · 0.45

Calls 2

loadImagesFunction · 0.70
loadLabelsFunction · 0.70

Tested by

no test coverage detected