Skip to content

Adding lrn op for ngraph engine#17189

Merged
tensor-tang merged 3 commits intoPaddlePaddle:developfrom
baojun-nervana:baojun/lrn
May 8, 2019
Merged

Adding lrn op for ngraph engine#17189
tensor-tang merged 3 commits intoPaddlePaddle:developfrom
baojun-nervana:baojun/lrn

Conversation

@baojun-nervana
Copy link
Contributor

@baojun-nervana baojun-nervana commented May 3, 2019

Added lrn op for ngraph engine which is needed for googlenet. A CreateConst helper function was added as well.
In the unittest, the tolerance was relaxed to 0.002, same as mkldnn test case. Otherwise I see the error as the following (don't quite understand the random decimal digits).

AssertionError: Output (MidOut) has diff at CPUPlace
514: Expect [[[[2.0005884 2.0006845 2.0005584 2.0006466 2.000742 ]
514: [2.0004916 2.0007987 2.0007715 2.0007942 2.0006254]
514: [2.0006313 2.0007539 2.0008295 2.0007706 2.0007606]
514: [2.000683 2.0005753 2.0004666 2.0005774 2.0008302]
514: [2.0005436 2.0009174 2.0009565 2.0007875 2.00066 ]]
514:
514: [[2.0005884 2.0006845 2.0005584 2.0006466 2.000742 ]
514: [2.0004916 2.0007987 2.0007715 2.0007942 2.0006254]
514: [2.0006313 2.0007539 2.0008295 2.0007706 2.0007606]
514: [2.000683 2.0005753 2.0004666 2.0005774 2.0008302]
514: [2.0005436 2.0009174 2.0009565 2.0007875 2.00066 ]]
514:
514: [[2.0005884 2.0006845 2.0005584 2.0006466 2.000742 ]
514: [2.0004916 2.0007987 2.0007715 2.0007942 2.0006254]
514: [2.0006313 2.0007539 2.0008295 2.0007706 2.0007606]
514: [2.000683 2.0005753 2.0004666 2.0005774 2.0008302]
514: [2.0005436 2.0009174 2.0009565 2.0007875 2.00066 ]]]
514:
514:
514: [[[2.0008764 2.0006783 2.0005012 2.0005872 2.0006566]
514: [2.0007496 2.000762 2.000739 2.0008848 2.0009556]
514: [2.0006292 2.0005717 2.0003912 2.0007153 2.0006144]
514: [2.0006511 2.0008154 2.0007868 2.0006576 2.0008616]
514: [2.0009568 2.000582 2.0004728 2.000677 2.0008805]]
514:
514: [[2.0008764 2.0006783 2.0005012 2.0005872 2.0006566]
514: [2.0007496 2.000762 2.000739 2.0008848 2.0009556]
514: [2.0006292 2.0005717 2.0003912 2.0007153 2.0006144]
514: [2.0006511 2.0008154 2.0007868 2.0006576 2.0008616]
514: [2.0009568 2.000582 2.0004728 2.000677 2.0008805]]
514:
514: [[2.0008764 2.0006783 2.0005012 2.0005872 2.0006566]
514: [2.0007496 2.000762 2.000739 2.0008848 2.0009556]
514: [2.0006292 2.0005717 2.0003912 2.0007153 2.0006144]
514: [2.0006511 2.0008154 2.0007868 2.0006576 2.0008616]
514: [2.0009568 2.000582 2.0004728 2.000677 2.0008805]]]]
514: But Got[[[[2. 2. 2. 2. 2.]
514: [2. 2. 2. 2. 2.]

@tensor-tang
Copy link
Contributor

In the unittest, the tolerance was relaxed to 0.002, same as mkldnn test case. Otherwise I see the error as the following (don't quite understand the random decimal digits).

Do we have plan to digger deeply why? Same with MKLDNN LRN.

@mozga-intel
Copy link
Contributor

mozga-intel commented May 7, 2019

@tensor-tang Sure, we can back to look at this one - before long. Right now it is impossible because we have other urgent issues. On the whole, this pull-request is really important for us, due to that CAPIs tests blow up.

Copy link
Contributor

@tensor-tang tensor-tang left a comment

Choose a reason for hiding this comment

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

OK, please add an issue to recored the 0.002 and you cloud fix later.

Thanks~

@tensor-tang tensor-tang merged commit 7bd1d03 into PaddlePaddle:develop May 8, 2019
@baojun-nervana baojun-nervana deleted the baojun/lrn branch May 8, 2019 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants