Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup model copying #503

Merged
merged 3 commits into from
Jan 2, 2023

Conversation

juliabeliaeva
Copy link
Contributor

No description provided.

copyWeight and saveOptimizerState parameters are unused in the OnnxInferenceModel, and InferenceModel is not required to have a name, so copiedModelName does not always make sense as well. It's better to have a more generic copy method in the interface, and move these parameters to the appropriate implementing classes.
TensorFlowInferenceModel does not have any layers, so it only makes sense to copy weights. And since the model class is not trainable, optimizer state does not need to be copied.
@juliabeliaeva juliabeliaeva merged commit 2ab09f0 into Kotlin:master Jan 2, 2023
@juliabeliaeva juliabeliaeva deleted the inference-model-copy branch January 2, 2023 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants