You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: unify model session handling and clean up feature extractors
- Use `$sessions` array in PretrainedModel instead of separate session properties
- Remove redundant constructors in model subclasses
- Minor logging and doc improvements in Audio and Image utils
- Update .gitignore for log files
if (count($imageMean) !== $image->channels || count($imageStd) !== $image->channels) {
424
-
thrownewException("When set to arrays, the length of `imageMean` (".count($imageMean).") and `imageStd` (".count($imageStd).") must match the number of channels in the image ({$image->channels}).");
366
+
thrownewException("When set to arrays, the length of `imageMean` (" . count($imageMean) . ") and `imageStd` (" . count($imageStd) . ") must match the number of channels in the image ({$image->channels}).");
425
367
}
426
368
427
369
// Normalize pixel data
@@ -450,15 +392,17 @@ public function preprocess(
450
392
* preprocesses each image, and concatenates the resulting
451
393
* features into a single Tensor.
452
394
*
453
-
* @param Image|Image[] $images The image(s) to extract features from.
395
+
* @param Image|Image[] $input The image(s) to extract features from.
454
396
* @param mixed ...$args Additional arguments.
455
397
*
456
398
* @return array An object containing the concatenated pixel values (and other metadata) of the preprocessed images.
0 commit comments