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

修复docs\api\paddle\Tenso 等 API 的文档 #58174

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/paddle/amp/auto_cast.py
Copy link
Contributor

Choose a reason for hiding this comment

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

这部分文件不用改了,我验证了下,原来是正确的

Original file line number Diff line number Diff line change
Expand Up @@ -746,14 +746,14 @@ def auto_cast(
... conv = conv2d(data)
... print(conv.dtype)
>>> # doctest: +SKIP("This has diff in xdoctest env")
paddle.float32
paddle.float16
>>> # doctest: -SKIP

>>> with paddle.amp.auto_cast(custom_black_list={'conv2d'}):
... conv = conv2d(data)
... print(conv.dtype)
>>> # doctest: +SKIP("This has diff in xdoctest env")
paddle.float32
paddle.float16
>>> # doctest: -SKIP

>>> a = paddle.rand([2, 3])
Expand Down
2 changes: 1 addition & 1 deletion python/paddle/vision/transforms/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ def adjust_hue(img, hue_factor):

>>> import numpy as np
>>> from PIL import Image
>>> from paddle.vision.transforms import functional as F
>>> from paddle.vision.transforms.adjust_hue import functional as F
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
>>> from paddle.vision.transforms.adjust_hue import functional as F
>>> from paddle.vision.transforms import adjust_hue

>>> fake_img = (np.random.rand(256, 300, 3) * 255.).astype('uint8')
>>> fake_img = Image.fromarray(fake_img)
>>> converted_img = F.adjust_hue(fake_img, 0.4)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
>>> converted_img = F.adjust_hue(fake_img, 0.4)
>>> converted_img = adjust_hue(fake_img, 0.4)

Expand Down