Skip to content

Commit

Permalink
Tidying comments
Browse files Browse the repository at this point in the history
  • Loading branch information
carlyrichmond committed Apr 25, 2024
1 parent 0195b97 commit 214a486
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions model-classification-app/scripts/transfer-learning.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ async function run() {

// Get features from MobileNet
const mobileNetFeatures = images.map((image) => {
// Normalize the image data. Image data is always in the range of 0 to 255,
// so you can simply divide resizedTensorFrame by 255 to ensure all values are between 0 and 1 instead as MobileNet expects
const normalizedImageTensor = image.div(255);
return mobileNetModel.predict(normalizedImageTensor.expandDims()).squeeze();
});
Expand Down

0 comments on commit 214a486

Please sign in to comment.