Skip to content

Commit

Permalink
Fix linear regression (apache#6432)
Browse files Browse the repository at this point in the history
* Fix Linear Regression Tutorial

* Small fix
  • Loading branch information
kevinthesun authored and Olivier committed May 30, 2017
1 parent 46beb61 commit ae80135
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/mxdoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def _get_src_download_btn(out_prefix, langs, lines):
for f in [ipynb, src]:
f = f.split('/')[-1]
btn += '<button type="button" class="btn btn-default download" '
btn += 'onclick="window.location=\'%s\'"><span class="glyphicon glyphicon-download-alt"></span> %s </a></button>\n' % (f, f)
btn += 'onclick="window.location=\'%s\'"><span class="glyphicon glyphicon-download-alt"></span> %s </button>\n' % (f, f)
btn += '</div>\n'
return btn

Expand Down
6 changes: 3 additions & 3 deletions docs/tutorials/python/linear-regression.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ how to encode a dataset into an iterator that MXNet can use. The data used in th

```python
#Training data
train_data = np.array([[1,2],[3,4],[5,6],[3,2],[7,1],[6,9]])
train_label = np.array([5,11,17,7,9,24])
train_data = np.random.uniform(0, 1, [100, 2])
train_label = np.array([train_data[i][0] + 2 * train_data[i][1] for i in range(100)])
batch_size = 1

#Evaluation Data
Expand Down Expand Up @@ -140,7 +140,7 @@ parameters of the model to fit the training data. This is accomplished using the

```python
model.fit(train_iter, eval_iter,
optimizer_params={'learning_rate':0.01, 'momentum': 0.9},
optimizer_params={'learning_rate':0.005, 'momentum': 0.9},
num_epoch=1000,
batch_end_callback = mx.callback.Speedometer(batch_size, 2))
```
Expand Down

0 comments on commit ae80135

Please sign in to comment.