Skip to content

Commit

Permalink
fix a wrong type judgment of make_grid (PaddlePaddle#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
HighCWu authored Dec 11, 2020
1 parent f047567 commit 6c81cc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ppgan/utils/visual.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def make_grid(tensor, nrow=8, normalize=False, range=None, scale_each=False):
images separately rather than the (min, max) over all images. Default: ``False``.
"""
if not (isinstance(tensor, paddle.Tensor) or
(isinstance(tensor, list) and all(isinstance(tensor, t) for t in tensor))):
(isinstance(tensor, list) and all(isinstance(t, paddle.Tensor) for t in tensor))):
raise TypeError('tensor or list of tensors expected, got {}'.format(type(tensor)))

# if list of tensors, convert to a 4D mini-batch Tensor
Expand Down

0 comments on commit 6c81cc3

Please sign in to comment.