-
Notifications
You must be signed in to change notification settings - Fork 111
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
DATA-3461 - Refactoring code for classifications #4764
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice! I think as long as all of the written tests in mlmodel service and vision service still pass, this is all looks good! I think as an extra sanity check, also manually test out our ImageNet classifier on a test robot on your computer using the new RDK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you split this file into two, one with the functions that just have to do with classification, and the other the generic Tensor to protobuf conversion functions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
of course! thank you for the first pass. I will update the PR description with all the manual testing
} | ||
|
||
// softmax takes the input slice and applies the softmax function. | ||
func softmax(in []float64) []float64 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you'll probably have to make this public, as I think it's used in the vision service
In app, for the Cloud ML model service, we will need to have code that basically looks at flat tensors and then parses the relevant classifications from them. This is essentially duplicated in the vision service, since that it almost exactly what we do.
Please cross-reference this PR for a WIP of what we're trying to accomplish: https://github.com/viamrobotics/app/pull/7458
I am mainly looking for feedback on whether:
a) this refactoring makes sense
b) if this where all the code should live
c) if you want me to add any more tests to make sure I didn't break anything