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

Fix variables initialization #355

Merged

Conversation

juliabeliaeva
Copy link
Contributor

@juliabeliaeva juliabeliaeva commented Apr 18, 2022

This PR partially (only for GraphTrainableModel) addresses #4 by storing the initializer Operand in KVariable and accessing it directly instead of trying to find it by name. It also refactors loading variable values when reading model from txt files or copying.

@juliabeliaeva juliabeliaeva requested a review from zaleslaw April 19, 2022 12:47
@juliabeliaeva juliabeliaeva force-pushed the fix-variables-initialization branch 2 times, most recently from 1cb1b00 to b73970f Compare April 27, 2022 01:44
…tion

For some initializers, like Zeros, initializer operations are named differently from what is expected. Because of this, such operations could not be found by name. Keeping initializer in the KVariable allows to access it directly.
…sorFlowInferenceModel

It won't work as the model does not have any layers.
…phTrainableModel

For some initializers, like Zeros, initializer operations are named differently from what is expected. Because of this, such operations could not be found by name. Getting a corresponding KVariable allows to access the initializer directly.
@juliabeliaeva juliabeliaeva force-pushed the fix-variables-initialization branch from 5e0e24a to d06f428 Compare April 27, 2022 13:26
@juliabeliaeva juliabeliaeva marked this pull request as ready for review April 27, 2022 19:16
@zaleslaw zaleslaw added the Review This PR is under review label Apr 28, 2022
@zaleslaw
Copy link
Collaborator

I'll take it for review

@zaleslaw
Copy link
Collaborator

zaleslaw commented May 8, 2022

I suppose it could be merged

@juliabeliaeva juliabeliaeva merged commit a0727b2 into Kotlin:master May 9, 2022
@juliabeliaeva juliabeliaeva deleted the fix-variables-initialization branch May 15, 2022 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Review This PR is under review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants