Skip to content

Conversation

zoooo0820
Copy link
Contributor

@zoooo0820 zoooo0820 commented Apr 28, 2022

add cn docs for two new API paddle.vision.transforms.erase and paddle.vision.transforms.RandomErasing

The API PR is #42280

@paddle-bot-old
Copy link

Thanks for your contribution!

返回
:::::::::

``paddle.Tensor 或 numpy.array 或PIL.Image``,擦除后的图像,类型与输入图像的类型一致。
Copy link
Contributor

Choose a reason for hiding this comment

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

或在引号外面

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, thanks


fake_img = paddle.randn((3, 10, 10)).astype(paddle.float32)
values = paddle.zeros((1,1,1), dtype=paddle.float32)
result = paddle.vision.transforms.erase(fake_img, 4, 4, 3, 3, values)
Copy link
Contributor

Choose a reason for hiding this comment

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

示例代码没有给出打印的结果

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, 减小了用例shape并给出了打印结果

Copy link
Contributor

@dingjiaweiww dingjiaweiww left a comment

Choose a reason for hiding this comment

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

LGTM

@dingjiaweiww dingjiaweiww merged commit ad4c307 into PaddlePaddle:develop May 10, 2022
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