Skip to content

Using Kotlin for Inference with custom model #857

Discussion options

You must be logged in to vote

One reason you could see the accuracy drop is if your pre-processing differs between the Java and Python. I would recommend checking this first. I see two potential issues with it:

  1. You are using both CenterCrop and Resize, but you should only need one. Doing both will just have the second one do nothing
  2. ToTensor should be the last operation in your transformation pipeline. It actually converts between the NHWC which is used for pre-processing and NCHW which is used for models.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jesse-schallenberger
Comment options

Answer selected by jesse-schallenberger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants