diff --git a/python/paddle/nn/functional/common.py b/python/paddle/nn/functional/common.py index fdd370d7f81e72462500cf3b47beed8062a14c90..7362b284eaefee25d8c976baf908de946a22b42d 100644 --- a/python/paddle/nn/functional/common.py +++ b/python/paddle/nn/functional/common.py @@ -296,7 +296,8 @@ def interpolate(x, ) if resample == 'AREA': - if isinstance(size, list) or isinstance(size, tuple): + if isinstance(size, list) or isinstance(size, tuple) or isinstance( + size, Variable): if len(size) == 0: raise ValueError("output size can not be empty") if len(x.shape) == 3: