Skip to content

How to save part of a model for later inference: encode + decoder #567

Answered by zachgk
hmf asked this question in Q&A
Discussion options

You must be logged in to vote

Try making two models: one using just the encoder block that you want to save and one using the whole block that you are training with.

For the translator, it is just a class to handle whatever logic you have for your preprocessing and postprocessing. Basically, the idea is to make some convenient Java class for your input and output of your model (or use one if it already exists). Then, convert from the input to NDList in the preprocessing and NDList to output in the postprocessing.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@hmf
Comment options

@zachgk
Comment options

@hmf
Comment options

Answer selected by hmf
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