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

Connect text feature with back end #341

Merged
merged 8 commits into from
Mar 26, 2018

Conversation

jetfuel
Copy link
Collaborator

@jetfuel jetfuel commented Mar 26, 2018

No description provided.

@jetfuel jetfuel self-assigned this Mar 26, 2018
@jetfuel
Copy link
Collaborator Author

jetfuel commented Mar 26, 2018

Fixes #246

daming-lu
daming-lu previously approved these changes Mar 26, 2018
Copy link
Collaborator

@daming-lu daming-lu left a comment

Choose a reason for hiding this comment

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

only 2 comments 😄

@@ -304,6 +309,9 @@ struct Text {
Tablet tablet_;
};

/*
* Text reader.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need this comment?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is to match with the comment style in other classes.

if data_size <= num_records:
return data

span = float(data_size) / (num_records - 1)
Copy link
Collaborator

Choose a reason for hiding this comment

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

if num_records == 1, it would 'div by 0'

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The num_records is like a constant, where is currently set to 100.
I will move it away from the parameter and set it into a const

@jetfuel
Copy link
Collaborator Author

jetfuel commented Mar 26, 2018

@daming-lu Code, updated.

@jetfuel jetfuel merged commit dbc6850 into PaddlePaddle:develop Mar 26, 2018
@jetfuel jetfuel deleted the connectTextFeatureWithBackEnd branch March 26, 2018 22:26
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

2 participants