Refine GRU Operator

release/0.11.0
guosheng 8 years ago
parent 2bed961211
commit 75426e013a

@ -154,6 +154,7 @@ class GRUGradKernel : public framework::OpKernel<T> {
}
if (h0_grad) {
ordered_h0_grad.mutable_data<T>(h0_grad->dims(), context.GetPlace());
zero(context.device_context(), &ordered_h0_grad, static_cast<T>(0.0));
}
bool is_reverse = context.Attr<bool>("is_reverse");

@ -149,7 +149,7 @@ class TestGRUOpReverse(TestGRUOp):
self.is_reverse = True
self.attrs = {
'activation': 'tanh',
'gate_activation': 'tanh',
'gate_activation': 'sigmoid',
'is_reverse': self.is_reverse
}

Loading…
Cancel
Save