Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance error message for interpolate_v2 #33941

Merged
merged 2 commits into from
Jul 6, 2021

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