Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Docs changes to BucketSentenceIter, Optimizer, ImageIter #6112

Merged
merged 2 commits into from
May 11, 2017

Conversation

lxn2
Copy link
Member

@lxn2 lxn2 commented May 5, 2017

No description provided.

label_width : int
Label dimension.
label_width : int, optional
Label dimension. The default label width is 1.
Copy link
Contributor

Choose a reason for hiding this comment

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

Label dimension (number of labels per example)

Copy link
Contributor

Choose a reason for hiding this comment

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

Does this mean the number of classes? Perhaps we can be clearer? Right now we say "Label dimension" and "label width" ostensibly to refer to the same quantity. Let's use consistent notation.

Copy link
Contributor

Choose a reason for hiding this comment

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

its not number of classes, which is the range of label. Its the number of labels.


Parameters
----------
index : int
An unique index to identify the weight.
A unique index to identify the parameter.
Copy link
Contributor

Choose a reason for hiding this comment

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

explain relationship to set_lr_mult and set_wd_mult

@madjam madjam added the Doc label May 5, 2017
Copy link
Contributor

@zackchase zackchase left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution to the docs. Can you please correct the minor issues indicated in the comments?

label_width : int
Label dimension.
label_width : int, optional
Label dimension. The default label width is 1.
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this mean the number of classes? Perhaps we can be clearer? Right now we say "Label dimension" and "label width" ostensibly to refer to the same quantity. Let's use consistent notation.

@@ -462,6 +462,7 @@ def __init__(self, batch_size, data_shape, label_width=1,
self.reset()

def reset(self):
"""Reset the iterator to the beginning of the data."""
Copy link
Contributor

Choose a reason for hiding this comment

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

"Reset" -> "Resets"

@@ -493,6 +494,7 @@ def next_sample(self):
return header.label, img

def next(self):
"""Return the next batch of data."""
Copy link
Contributor

Choose a reason for hiding this comment

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

"Return" -> "Returns"

@@ -154,18 +154,18 @@ def create_state(self, index, weight):
"""

def update(self, index, weight, grad, state):
"""Update the weight given the corresponding gradient and state.
"""Update the parameters given the corresponding gradients and state.
Copy link
Contributor

Choose a reason for hiding this comment

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

"Update" -> "Updates"

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this updating a single parameter tensor or multiple? If a single one let's just say: "Updates the given parameter using the corresponding gradient and state."

@@ -135,6 +135,7 @@ def __init__(self, sentences, batch_size, buckets=None, invalid_label=-1,
self.reset()

def reset(self):
"""Reset the iterator to the beginning of the data."""
Copy link
Contributor

Choose a reason for hiding this comment

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

"Reset" -> "Resets"

@@ -150,6 +151,7 @@ def reset(self):
self.ndlabel.append(ndarray.array(label, dtype=self.dtype))

def next(self):
"""Return the next batch of data."""
Copy link
Contributor

Choose a reason for hiding this comment

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

"Return" -> "Returns"

@zackchase
Copy link
Contributor

Hey can we get these changes made so we can merge in?

@lxn2
Copy link
Member Author

lxn2 commented May 10, 2017

@zackchase @piiswrong updated with suggested changes

@zackchase
Copy link
Contributor

zackchase commented May 10, 2017 via email

@piiswrong piiswrong merged commit e383fd8 into apache:master May 11, 2017
saurabh3949 pushed a commit to saurabh3949/mxnet that referenced this pull request May 23, 2017
* Docs changes to BucketSentenceIter, Optimizer, ImageIter

* Change verbiage and correct details
Guneet-Dhillon pushed a commit to Guneet-Dhillon/mxnet that referenced this pull request Sep 13, 2017
* Docs changes to BucketSentenceIter, Optimizer, ImageIter

* Change verbiage and correct details
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants