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();