From a4c898cf667b4961df2de6d43855a7623c686a2a Mon Sep 17 00:00:00 2001 From: LielinJiang <50691816+LielinJiang@users.noreply.github.com> Date: Wed, 22 Jun 2022 11:01:30 +0800 Subject: [PATCH] [Cherrypick 2.3] fix decode jpeg example code (#42752) * fix decode_jpeg example code * fix decode_jpeg example code --- python/paddle/vision/ops.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/paddle/vision/ops.py b/python/paddle/vision/ops.py index e4dd4c797fe..d45c652885b 100644 --- a/python/paddle/vision/ops.py +++ b/python/paddle/vision/ops.py @@ -895,7 +895,10 @@ def decode_jpeg(x, mode='unchanged', name=None): Examples: .. code-block:: python + + # required: gpu import cv2 + import numpy as np import paddle fake_img = (np.random.random( -- GitLab