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

Fixes #i302, handle OVR decision function #450

Merged
merged 5 commits into from
May 6, 2020
Merged

Fixes #i302, handle OVR decision function #450

merged 5 commits into from
May 6, 2020

Conversation

xadupre
Copy link
Collaborator

@xadupre xadupre commented Apr 29, 2020

No description provided.

@xadupre xadupre changed the title Fixes #i302, handle OVR decision function [WIP] Fixes #i302, handle OVR decision function Apr 29, 2020
@xadupre xadupre changed the title [WIP] Fixes #i302, handle OVR decision function Fixes #i302, handle OVR decision function Apr 30, 2020
@xadupre xadupre added this to In progress in August 2020 Apr 30, 2020
@lgtm-com
Copy link

lgtm-com bot commented Apr 30, 2020

This pull request fixes 1 alert when merging f6eca3a into 72d43c0 - view on LGTM.com

fixed alerts:

  • 1 for Unused argument in a formatting call

@@ -140,6 +148,127 @@ def convert_sklearn_svm(scope, operator, container):
raise ValueError("Unknown support vector machine model type found "
"'{0}'.".format(operator.type))

if (hasattr(op, 'decision_function_shape') and
op.decision_function_shape == 'ovr' and handles_ovr):
# Applies _ovr_decision_function.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be better to just add reference to the scikit implementation rather than adding the entire code here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

links to code are not really stable and it is easier to understand what the converter does by looking at the numpy code

"Classes different from first n integers are not supported "
"in SVC converter.")

cst3 = scope.get_unique_variable_name('cst3')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's difficult to understand what cst0, cst1 and cst3 mean. It would be better to have clearer node names.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cst0 = constant equal to 0, cst1 = constant equal to 1, cst3 = constant equal to 3

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable name is fine, it would be better to have the onnx node name as const0, etc. Anyways, this is a minor issue.

@lgtm-com
Copy link

lgtm-com bot commented May 6, 2020

This pull request fixes 1 alert when merging e5c345d into c6e631d - view on LGTM.com

fixed alerts:

  • 1 for Unused argument in a formatting call

@xadupre xadupre merged commit 5dec2d2 into onnx:master May 6, 2020
@xadupre xadupre moved this from In progress to Done in August 2020 May 6, 2020
@xadupre xadupre deleted the i302svc branch June 1, 2020 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
August 2020
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants