Skip to content

Conversation

@dsmilkov
Copy link
Contributor

@dsmilkov dsmilkov commented Dec 3, 2019

Fixes #2467

There is no need to re-import the graph after fusing just to extract the tensor values since there is a util method that can return np.array from a TensorProto.

BUG


This change is Reviewable

@dsmilkov dsmilkov requested review from nsthorat and pyu10055 December 3, 2019 22:02
@dsmilkov dsmilkov changed the title Fix fused depthwise problem [converter] Fix mobilenet conversion problem Dec 3, 2019
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.

Reviewable status: :shipit: complete! 1 of 1 approvals obtained (waiting on @dsmilkov, @nsthorat, and @pyu10055)


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

  graph = tf.Graph()
  fuse_prelu.register_prelu_func(graph)

you can remove the register_prelu func as well

Copy link
Contributor Author

@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.

Reviewable status: :shipit: complete! 1 of 1 approvals obtained (waiting on @nsthorat and @pyu10055)


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

Previously, pyu10055 (Ping Yu) wrote…

you can remove the register_prelu func as well

i can't unfortunately because it's used elsewhere, in between optimization passes

Copy link
Contributor

@nsthorat nsthorat left a comment

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

@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.

Reviewable status: :shipit: complete! 2 of 1 approvals obtained (waiting on @pyu10055)


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

Previously, dsmilkov (Daniel Smilkov) wrote…

i can't unfortunately because it's used elsewhere, in between optimization passes

actually, turns out we can since we never reimport the graph after adding prelu

@pyu10055 pyu10055 merged commit 0839b62 into master Dec 3, 2019
@pyu10055 pyu10055 deleted the fix-fused-depthwise branch December 3, 2019 22:56
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.

Fusing of depthwise breaks mobilenet conversion

5 participants