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

[Frontend][TFLite] Add parser support for 'square' operator #4915

Merged
merged 3 commits into from
Feb 26, 2020

Conversation

inadob
Copy link
Contributor

@inadob inadob commented Feb 19, 2020

This patch is built on top of #4913

  • 'square' is an unary elemwise operator but it's added separately in the parser since there is no Relay 'square' operation and instead we have to use 'power'
  • tflite still doesn't support the operator in uint8

Copy link
Contributor

@wyc-ruiker wyc-ruiker left a comment

Choose a reason for hiding this comment

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

You could also refer to the implementation in convert_squared_difference, maybe could consider using power.

tests/python/frontend/tflite/test_forward.py Outdated Show resolved Hide resolved
* Add parser implementation
* Add relevant tests
* Note: 'square' is an unary elemwise operator but it's added separately
  in the parser since there is no Relay 'square' op
  and instead we have to use 'multiply'
Copy link
Contributor

@wyc-ruiker wyc-ruiker left a comment

Choose a reason for hiding this comment

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

LGTM

@tqchen tqchen merged commit 8e7e779 into apache:master Feb 26, 2020
@tqchen
Copy link
Member

tqchen commented Feb 26, 2020

Thanks @inadob @wyc-ruiker !

alexwong pushed a commit to alexwong/tvm that referenced this pull request Feb 29, 2020
)

* [Frontend][TFLite] Add parser support for square operator

* Add parser implementation
* Add relevant tests
* Note: 'square' is an unary elemwise operator but it's added separately
  in the parser since there is no Relay 'square' op
  and instead we have to use 'multiply'

* Change relay operation from 'multiply' to 'power'

* Remove a redundant line as requested
alexwong pushed a commit to alexwong/tvm that referenced this pull request Feb 29, 2020
)

* [Frontend][TFLite] Add parser support for square operator

* Add parser implementation
* Add relevant tests
* Note: 'square' is an unary elemwise operator but it's added separately
  in the parser since there is no Relay 'square' op
  and instead we have to use 'multiply'

* Change relay operation from 'multiply' to 'power'

* Remove a redundant line as requested
zhiics pushed a commit to neo-ai/tvm that referenced this pull request Mar 2, 2020
)

* [Frontend][TFLite] Add parser support for square operator

* Add parser implementation
* Add relevant tests
* Note: 'square' is an unary elemwise operator but it's added separately
  in the parser since there is no Relay 'square' op
  and instead we have to use 'multiply'

* Change relay operation from 'multiply' to 'power'

* Remove a redundant line as requested
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Apr 16, 2020
)

* [Frontend][TFLite] Add parser support for square operator

* Add parser implementation
* Add relevant tests
* Note: 'square' is an unary elemwise operator but it's added separately
  in the parser since there is no Relay 'square' op
  and instead we have to use 'multiply'

* Change relay operation from 'multiply' to 'power'

* Remove a redundant line as requested
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants