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
release/0.12.0
Yang Yang(Tony) 7 years ago committed by GitHub
parent 6171705a2c
commit 2182ecfbbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -56,8 +56,6 @@ class GRUKernel : public framework::OpKernel<T> {
auto* hidden = context.Output<LoDTensor>("Hidden");
hidden->mutable_data<T>(context.GetPlace());
context.ShareLoD("Input", "Hidden");
auto hidden_dims = hidden->dims();
bool is_reverse = context.Attr<bool>("is_reverse");

@ -33,7 +33,6 @@ class SequenceConvKernel : public framework::OpKernel<T> {
auto filter = *context.Input<Tensor>("Filter");
out->mutable_data<T>(context.GetPlace());
context.ShareLoD("X", "Out");
int context_start = context.Attr<int>("contextStart");
int context_length = context.Attr<int>("contextLength");

@ -244,7 +244,7 @@ def infer(use_cuda, save_dirname=None):
assert len(results[0]) == len(transpiler_results[0])
for i in range(len(results[0])):
np.testing.assert_almost_equal(
results[0][i], transpiler_results[0][i], decimal=6)
results[0][i], transpiler_results[0][i], decimal=5)
print("infer results: ", results[0])

Loading…
Cancel
Save