Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lilyissillyyy committed May 9, 2024
1 parent f2147f3 commit f969002
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion structures/Tensorflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ module.exports = class Tensorflow {
const desiredHeight = 400;
const aspectRatio = originalWidth / originalHeight;
const newWidth = Math.round(desiredHeight / aspectRatio);
const resizedImage = tf.image.resizeBilinear(imageTensor, [desiredHeight, newWidth]);
const resizedImage = tf.image.resizeBilinear(imageTensor, [newWidth, desiredHeight]);
imageTensor.dispose();
const loadedImage = resizedImage.toFloat().div(tf.scalar(255)).expandDims();
resizedImage.dispose();
Expand Down

0 comments on commit f969002

Please sign in to comment.