未验证 提交 2182ecfb 编写于 作者: Y Yang Yang(Tony) 提交者: GitHub

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
上级 6171705a
......@@ -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])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册