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

converts functions to poroperties where applicable (#29) #31

Merged
merged 6 commits into from
Jan 25, 2021

Conversation

LostMekka
Copy link
Contributor

@LostMekka LostMekka commented Jan 19, 2021

Fixes #29.

Changes:

  • Optimizer
    • fun getOptimizerName() -> val optimizerName
    • fun isRunningOnGPU() -> val isRunningOnGPU
  • Layer
    • fun getParams() -> val paramCount
    • fun hasActivation() -> val hasActivation
    • fun getWeights() -> fun extractWeights()
  • Dense
    • fun getKernelShape() -> val kernelShapeArray
    • fun getBiasShape() -> val biasShapeArray
  • Conv2D
    • fun getKernelShape() -> val kernelShapeArray
    • fun getBiasShape() -> val biasShapeArray

@LostMekka
Copy link
Contributor Author

@zaleslaw I was not sure about the changes in Dense and Conv2D. There were name collisions with private properties, so I renamed the public ones. I could also rename the private ones instead to keep the API cleaner...

I also chose the name extractWeights for now, but this can of course be changed 😃

@zaleslaw
Copy link
Collaborator

Dear @LostMekka could I advise you to convert extractWeights to property 'weights' with getter, long body of getter could be extracted to the separate function with name 'extractConv2DWeights' for example?
Will it became cleaner?

@zaleslaw
Copy link
Collaborator

All previous changes could be merged, but maybe we achieve more for weights getters

also cleaned up weights code for Dense and Conv2D
@LostMekka
Copy link
Contributor Author

OK, I have converted extractWeights to a property as well :)

@zaleslaw zaleslaw merged commit e41b26d into Kotlin:master Jan 25, 2021
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.

Convert functions to properties in public API
2 participants