https://kotlinlang.org logo
Title
a

Alex

02/18/2023, 1:50 AM
https://github.com/Kotlin/kotlindl/blob/master/docs/loading_trained_model_for_inference.md With reference to this guide, if i were to input a 32x32 image, would the model prediction still work?
j

Julia Beliaeva

02/18/2023, 3:35 AM
Model is trained for a specific input size, so you should resize your image before passing it to a model. You can do it with the image preprocessing dsl like so:
pipeline<BufferedImage>().resize {
    outputWidth = 28
    outputHeight = 28
}.apply(image)
(in this example
image
is a
BufferedImage
you have loaded)
a

Alex

02/18/2023, 3:37 AM
thanks @Julia Beliaeva