Skip to content

Commit 42549fb

Browse files
Merge pull request #7811 from wanghaoshuang/fix_im2seq
Fix LoD calculate of im2seq
2 parents de89b47 + f2a32dd commit 42549fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

paddle/operators/im2sequence_op.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class Im2SequenceKernel : public framework::OpKernel<T> {
7979
framework::LoD lod(1);
8080
lod[0].reserve(batch_size + 1);
8181
for (int i = 0, offset = 0; i < batch_size + 1; ++i) {
82-
lod[0][i] = offset;
82+
lod[0].push_back(offset);
8383
offset += output_height * output_width;
8484
}
8585
out->set_lod(lod);

0 commit comments

Comments
 (0)