From f969002118e8c1bbbbd8681f6ce4446b8c3f814c Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Thu, 9 May 2024 15:19:37 -0400 Subject: [PATCH] Fix --- structures/Tensorflow.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/structures/Tensorflow.js b/structures/Tensorflow.js index 0e42c0bb..d6087221 100644 --- a/structures/Tensorflow.js +++ b/structures/Tensorflow.js @@ -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();