Skip to content

Commit 7d00a27

Browse files
Fix bug in imageToTensor shape
1 parent dae4eb6 commit 7d00a27

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Utils/Image.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ public function toTensor(string $channelFormat = 'CHW'): Tensor
313313

314314
$pixels = $this->pixelData();
315315

316-
$tensor = new Tensor($pixels, Tensor::float32, [$width, $height, $this->channels]);
316+
$tensor = new Tensor($pixels, Tensor::float32, [$height, $width, $this->channels]);
317317

318318
if ($channelFormat === 'HWC') {
319319
// Do nothing

0 commit comments

Comments
 (0)