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

[DOC] historgram code samples, test=develop #2732

Merged
merged 3 commits into from
Sep 30, 2020
Merged

[DOC] historgram code samples, test=develop #2732

merged 3 commits into from
Sep 30, 2020

Conversation

qili93
Copy link
Contributor

@qili93 qili93 commented Sep 29, 2020

Remove static sample:

Paddle PR: PaddlePaddle/Paddle#24912

@paddle-bot-old
Copy link

Thanks for your contribution!

@qili93
Copy link
Contributor Author

qili93 commented Sep 29, 2020

image

@qili93
Copy link
Contributor Author

qili93 commented Sep 29, 2020

image

@@ -15,39 +15,19 @@ histogram

返回:直方图。

返回类型:Variable,数据为int64类型,维度为(nbins,)。
返回类型:数据为int64类型,维度为(nbins,)。
Copy link
Collaborator

Choose a reason for hiding this comment

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

参数 Variable -> Tensor
不需要写返回类型 写在返回里,如
【返回:Tensor,数据为int64类型,xxxxxx】

print(np.array(res[0])) # [0, 3, 0, 2, 1]

**代码示例2**:
paddle.disable_static(paddle.CPUPlace())
Copy link
Collaborator

Choose a reason for hiding this comment

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

28 和 32 不需要了哈~

Copy link
Collaborator

@TCChenlong TCChenlong left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@TCChenlong TCChenlong left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@TCChenlong TCChenlong left a comment

Choose a reason for hiding this comment

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

LGTM

@qili93 qili93 closed this Sep 30, 2020
@qili93 qili93 reopened this Sep 30, 2020
@qili93 qili93 changed the title [DOC] update code sample of historgram, test=develop [DOC] historgram code samples, test=develop Sep 30, 2020
@qili93 qili93 closed this Sep 30, 2020
@qili93 qili93 reopened this Sep 30, 2020
@PaddlePaddle PaddlePaddle locked as off-topic and limited conversation to collaborators Sep 30, 2020
@PaddlePaddle PaddlePaddle unlocked this conversation Sep 30, 2020
@zhupengyang zhupengyang merged commit 3f173a3 into PaddlePaddle:develop Sep 30, 2020
@qili93 qili93 deleted the histogram_op_comments branch September 30, 2020 05:41
RichardWooSJTU pushed a commit to RichardWooSJTU/docs that referenced this pull request Apr 8, 2022
* add files

* Update README.md

* Update README.md

* Update restapi.py

pretrained=True and model.eval() are used by default when loading a model now, so no need to call them manually.

* PEP8 reformat

* PEP8 reformat

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
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.

None yet

3 participants