Skip to content

Commit

Permalink
Adding additional comments to explain parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
carlyrichmond committed Apr 26, 2024
1 parent ca1f44d commit f111767
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions model-classification-app/scripts/custom-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions model-classification-app/scripts/transfer-learning.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
});

Expand Down

0 comments on commit f111767

Please sign in to comment.