Skip to content

Conversation

@pyu10055
Copy link
Collaborator

@pyu10055 pyu10055 commented Dec 2, 2019

Support fusing MatMul + BiasAdd + Activation => _FusedMatMul

To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.


This change is Reviewable

Copy link
Contributor

@dsmilkov dsmilkov left a comment

Choose a reason for hiding this comment

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

Awesome! 2 small comments.

Reviewed 9 of 9 files at r1.
Reviewable status: :shipit: complete! 1 of 1 approvals obtained (waiting on @dsmilkov and @pyu10055)


tfjs-converter/python/tensorflowjs/converters/fuse_prelu.py, line 160 at r1 (raw file):

    updated_alpha.append(neg_alpha_op.name)

def fuse_prelu_with_fused_conv2d(input_graph_def):

rename to fused_prelu_with_conv2d_or_matmul


tfjs-converter/python/tensorflowjs/converters/graph_rewrite_util.py, line 23 at r1 (raw file):

# Custom op name for fused depthwise conv2d
FUSED_DEPTHWISE_CONV2D = 'FusedDepthwiseConv2dNative'
FUSED_MATMUL = '_FusedMatMul'

add a comment on top saying that this starts with underscore because the name was created by grappler


tfjs-converter/src/operations/executors/matrices_executor_test.ts, line 58 at r1 (raw file):

    });
    describe('_FusedMatMul', () => {
      it('should call tfc.fused.matMul', () => {

add a test with prelu as well

@pyu10055 pyu10055 merged commit dee6aa4 into master Dec 3, 2019
@pyu10055 pyu10055 deleted the fused_matmul branch December 3, 2019 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants