Skip to content

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 😄

};

/*
* 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.

2 participants