Skip to content

Commit

Permalink
add more support type
Browse files Browse the repository at this point in the history
  • Loading branch information
LielinJiang committed Oct 15, 2020
1 parent 2714d76 commit c1e3dbf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/paddle/fluid/dataloader/dataloader_iter.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import sys
import time
import signal
import numbers
import logging
import itertools
import threading
Expand Down Expand Up @@ -83,7 +84,7 @@ def default_collate_fn(batch):

outputs = []
for slot in slots:
if isinstance(slot[0], np.ndarray):
if isinstance(slot[0], (np.ndarray, np.bool, numbers.Number)):
tmp = np.stack(slot, axis=0)
outputs.append(tmp)
elif isinstance(slot[0], paddle.Tensor):
Expand Down

1 comment on commit c1e3dbf

@paddle-bot-old
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulation! Your pull request passed all required CI. You could ask reviewer(s) to approve and merge. 🎉

Please sign in to comment.