Skip to content

Commit ddf5c5b

Browse files
committed
use copy-from function for the code example
1 parent db44771 commit ddf5c5b

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

docs/api/paddle/vision/transforms/adjust_brightness_cn.rst

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,6 @@ adjust_brightness
2121
代码示例
2222
:::::::::
2323

24-
.. code-block:: python
24+
COPY-FROM: paddle.vision.transforms.adjust_brightness
2525

26-
import numpy as np
27-
from PIL import Image
28-
from paddle.vision.transforms import functional as F
29-
30-
fake_img = (np.random.rand(256, 300, 3) * 255.).astype('uint8')
31-
32-
fake_img = Image.fromarray(fake_img)
33-
34-
converted_img = F.adjust_brightness(fake_img, 0.4)
35-
print(converted_img.size)
3626

0 commit comments

Comments
 (0)