Skip to content
This repository has been archived by the owner on Aug 15, 2019. It is now read-only.

Add support for shapeN operation #210

Merged
merged 1 commit into from
Sep 13, 2018
Merged

Conversation

yhwang
Copy link
Contributor

@yhwang yhwang commented Sep 10, 2018

Support shapeN operation and also add
a test case for it.

Signed-off-by: Yihong Wang yh.wang@ibm.com


This change is Reviewable

@yhwang
Copy link
Contributor Author

yhwang commented Sep 11, 2018

when trying to use the speech recognition in transformer model, several operations are missing and ShapeN is one of them. Our team start to fill the missing ops as possible as we can. We start with the easier ones.

One question: this PR handles shapeN operation in tfjs-converter for the model that is imported from tensorflow but not in tfjs-core. Should ShapeN be supported in tfjs-core?

Copy link
Collaborator

@pyu10055 pyu10055 left a comment

Choose a reason for hiding this comment

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

Thank for adding this support, we can implement this op in the converter only.

node.op = 'shapeN';
expect(
(executeOp(node,
{ input1, input2: input3 }, context) as tfc.Tensor[])
Copy link
Collaborator

Choose a reason for hiding this comment

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

the feed here is bit confusing, you can change to
node.inputNames = ['input1', 'input3'];
executeOp(node, { input1, input3 }, context)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you're right. fixed!

Support shapeN operation and also add
a test case for it.

Signed-off-by: Yihong Wang <yh.wang@ibm.com>
@pyu10055 pyu10055 merged commit 4f9f349 into tensorflow:master Sep 13, 2018
@yhwang yhwang deleted the add_op_shapen branch September 13, 2018 16:18
@yhwang
Copy link
Contributor Author

yhwang commented Sep 13, 2018

@pyu10055 thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants