Skip to content

Commit 2bb8f5b

Browse files
authored
Support variable data shape of non-sequence data. (#13482)
1 parent 8a8c572 commit 2bb8f5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/paddle/fluid/data_feeder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def _feed_impl_(self, data, lod, lod_level):
7171

7272
def done(self):
7373
arr = numpy.array(self.data, dtype=self.dtype)
74-
if self.shape:
74+
if self.shape and len(arr.shape) != len(self.shape):
7575
arr = arr.reshape(self.shape)
7676
t = core.LoDTensor()
7777
t.set(arr, self.place)

0 commit comments

Comments
 (0)