-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Relay][Frontend] Adding ADD operator to tflite frontend for compiling the MobileNetV2 #2919
Conversation
gomida
commented
Mar 28, 2019
- Adding ADD operator to tflite frontend for compiling the MobileNetV2
- Adding TestCase
sync upstream
* Change URL for MobileNetV2
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.
LGTM. @gomida Thanks for your contribution.
Hi @FrozenGene do I need to request review to additional member? |
@srkreddy1238 Pls help to review. |
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.
LGTM . Thanks.
…g the MobileNetV2 (apache#2919)
…g the MobileNetV2 (apache#2919)
…g the MobileNetV2 (apache#2919)
…g the MobileNetV2 (apache#2919)
…g the MobileNetV2 (apache#2919)
@gomida Sorry to disturb you. However, maybe I find one potential issue we didn't consider in code. Let us imagine the LHS shape is not the same as RHS shape. For example, TFLite input layout is [1, 16, 32, 180], RHS shape is [180]. Then we should got [1, 16, 32, 180]. However, we transpose input layout be [1, 180, 16, 32], then RHS shape is [180]. In code, we just pass this condition. So we gout [1, 180, 16, 32] + [180], which couldn't do broadcast. One way to solve is:
My origin plan is to support TFLite NHWC data layout as #2519 described after my quantization part is upstreamed done. However, if you are interested to support it , also welcome. It shouldn't be difficult. |
@FrozenGene sure, I'll look into the issue :) |
@FrozenGene during test, I found some more problems. We've assumed that the LHS as tensor, but in some cases, the LHS may not be a tensor (in this case the RHS is a tensor). This requires some more complex handling. On the other hand, changing the layout to the original NHWC will add many transpose layers and make it as slow as the imported TF models - not an easy decision because we have no "automatic layout conversion pass" mentioned in #2519 currently. |
@gomida Could you give example / model when we have the case of LHS is constant values? During model testing, I only meet LHS is tensor and RHS is constant condition. The performance shouldn't be problem. Because we will fuse these Additionally, I plan to support TFLite NHWC data layout and implement |