File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -290,12 +290,13 @@ class FusionGRUKernel : public framework::OpKernel<T> {
290
290
void BatchCompute (const framework::ExecutionContext& ctx) const {
291
291
using DeviceContext = paddle::platform::CPUDeviceContext;
292
292
auto * x = ctx.Input <LoDTensor>(" X" );
293
+ INIT_BASE_INPUT_OUTPUT
294
+ INIT_BASE_SIZES
293
295
if (x->lod ()[0 ].size () == 2 ) {
296
+ xx->Resize ({total_T, D3});
294
297
SeqCompute (ctx);
295
298
return ;
296
299
}
297
- INIT_BASE_INPUT_OUTPUT
298
- INIT_BASE_SIZES
299
300
INIT_VEC_FUNC
300
301
301
302
auto * reordered_h0 = ctx.Output <Tensor>(" ReorderedH0" );
Original file line number Diff line number Diff line change @@ -424,11 +424,12 @@ class FuisonLSTMKernel : public framework::OpKernel<T> {
424
424
void BatchCompute (const framework::ExecutionContext& ctx) const {
425
425
using DeviceContext = platform::CPUDeviceContext;
426
426
INIT_BASE_INPUT_OUTPUT
427
+ INIT_BASE_SIZES
427
428
if (x->lod ()[0 ].size () == 2 ) {
429
+ xx->Resize ({x_dims[0 ], D4});
428
430
SeqCompute (ctx);
429
431
return ;
430
432
}
431
- INIT_BASE_SIZES
432
433
INIT_VEC_FUNC
433
434
INIT_BASE_INPUT_DATAS
434
435
You can’t perform that action at this time.
0 commit comments