mul bug fix

This commit is contained in:
uyzhang 2021-03-21 22:06:53 +08:00 committed by Jittor
parent d5bbea7319
commit 7ace88d718
1 changed files with 1 additions and 1 deletions

View File

@ -249,7 +249,7 @@ def to_pil_image(pic, mode=None):
npimg = pic
if isinstance(pic, jt.Var):
if 'float' in str(pic.dtype) and mode != 'F':
pic = pic.mul(255).uint8()
pic = pic.multiply(255).uint8()
npimg = np.transpose(pic.numpy(), (1, 2, 0))
if not isinstance(npimg, np.ndarray):