diff --git a/model-classification-app/scripts/custom-model.js b/model-classification-app/scripts/custom-model.js index 8366d64..de30020 100644 --- a/model-classification-app/scripts/custom-model.js +++ b/model-classification-app/scripts/custom-model.js @@ -36,9 +36,9 @@ async function run() { const NUM_EPOCHS = 10; await model.fit(singleImageTensor, labelsTensor, { - batchSize: BATCH_SIZE, - epochs: NUM_EPOCHS, - shuffle: true, + batchSize: BATCH_SIZE, // Number of samples to work through before updating the internal model parameters + epochs: NUM_EPOCHS, // Number of passes through the dataset + shuffle: true, // Shuffle data before each pass }); // Classify images diff --git a/model-classification-app/scripts/transfer-learning.js b/model-classification-app/scripts/transfer-learning.js index fb149ae..4b680d4 100644 --- a/model-classification-app/scripts/transfer-learning.js +++ b/model-classification-app/scripts/transfer-learning.js @@ -50,9 +50,9 @@ async function run() { const labelsTensor = tf.tensor2d(labels); await myTransferMobileNetModel.fit(singleImageTensor, labelsTensor, { - shuffle: true, - batchSize: 5, - epochs: 10, + shuffle: true, // Shuffle data before each pass + batchSize: 5, // Number of samples to work through before updating the internal model parameters + epochs: 10, // Number of passes through the dataset callbacks: { onEpochEnd: logProgress }, });