Skip to content

Commit 2182ecf

Browse files
author
Yang Yang(Tony)
authored
remove duplicated ShareLoD in gru_op and sequence_conv_op (#10149)
* remove share lod; it has already been performed in infershape * slightly release test bound of test_image_classification
1 parent 6171705 commit 2182ecf

File tree

3 files changed

+1
-4
lines changed

3 files changed

+1
-4
lines changed

paddle/fluid/operators/gru_op.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ class GRUKernel : public framework::OpKernel<T> {
5656
auto* hidden = context.Output<LoDTensor>("Hidden");
5757
hidden->mutable_data<T>(context.GetPlace());
5858

59-
context.ShareLoD("Input", "Hidden");
60-
6159
auto hidden_dims = hidden->dims();
6260

6361
bool is_reverse = context.Attr<bool>("is_reverse");

paddle/fluid/operators/sequence_conv_op.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ class SequenceConvKernel : public framework::OpKernel<T> {
3333
auto filter = *context.Input<Tensor>("Filter");
3434

3535
out->mutable_data<T>(context.GetPlace());
36-
context.ShareLoD("X", "Out");
3736

3837
int context_start = context.Attr<int>("contextStart");
3938
int context_length = context.Attr<int>("contextLength");

python/paddle/fluid/tests/book/test_image_classification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def infer(use_cuda, save_dirname=None):
244244
assert len(results[0]) == len(transpiler_results[0])
245245
for i in range(len(results[0])):
246246
np.testing.assert_almost_equal(
247-
results[0][i], transpiler_results[0][i], decimal=6)
247+
results[0][i], transpiler_results[0][i], decimal=5)
248248

249249
print("infer results: ", results[0])
250250

0 commit comments

Comments
 (0)