Skip to content

Conversation

@tink2123
Copy link
Contributor

@tink2123 tink2123 commented Jul 2, 2021

PR types

Bug fixes

PR changes

OPs

Describe

fix interpolate for input_shape[i] == 0

import paddle
import paddle.nn as nn
import numpy as np

array = []
input_data = paddle.to_tensor(np.reshape(array, (17, 10, 0, 0)), dtype='float32')
upsample_out = paddle.nn.Upsample(size=[1, 1], align_corners=False, align_mode=0)
output = upsample_out(input_data)
# ValueError: (InvalidArgument) The shape of input(x) should be larged than 0, bug received shape[2] is 0 

@paddle-bot-old
Copy link

paddle-bot-old bot commented Jul 2, 2021

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Copy link
Contributor

@jeff41404 jeff41404 left a comment

Choose a reason for hiding this comment

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

lgtm

@ceci3 ceci3 merged commit f2068ee into PaddlePaddle:develop Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants