Skip to content

align the dygraph behavior of simnet with static graph#4662

Open
FrostML wants to merge 1 commit intoPaddlePaddle:dev-staticfrom
FrostML:simnet
Open

align the dygraph behavior of simnet with static graph#4662
FrostML wants to merge 1 commit intoPaddlePaddle:dev-staticfrom
FrostML:simnet

Conversation

@FrostML
Copy link
Contributor

@FrostML FrostML commented May 26, 2020

【WIP】In dygraph similarity_net, list problems before this fix:

  • use fluid.layers.reshape(size=[-1, 1]) to guarantee that the shape of Embedding's input is [xx, xx, 1], which is NOT recommended and NOT proper for batch input.
  • the behavior for lstm and gru to compute sequence representation is NOT align with static graph, which is fluid.layers.reduce_sum while sequence_last_step for static graph.

Due to pre-commit, code format has been changed. Mark changes as follow to help review.

  • gru.py
    image

image

  • lstm.py
    image

image

  • paddle_layers.py
    image

  • run_classifier.py
    delete all fluid.layers.reshape

  • utils.py
    image

@FrostML FrostML requested a review from guoshengCS May 26, 2020 02:48
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants