GeezerVison is showing github.com — Merge pull request #102 from dallascard/minor_suggestions · EugenePig/DeepLearningTutorials@a16ed9e
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: code/logistic_sgd.py +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -94,11 +94,11 @@ def __init__(self, input, n_in, n_out): | 94 | 94 | # symbolic expression for computing the matrix of class-membership | 95 | 95 | # probabilities | 96 | 96 | # Where: | 97 | | - # W is a matrix where column-k represent the separation hyper plain for | | 97 | + # W is a matrix where column-k represent the separation hyperplane for | 98 | 98 | # class-k | 99 | 99 | # x is a matrix where row-j represents input training sample-j | 100 | | - # b is a vector where element-k represent the free parameter of hyper | 101 | | - # plain-k | | 100 | + # b is a vector where element-k represent the free parameter of | | 101 | + # hyperplane-k | 102 | 102 | self.p_y_given_x = T.nnet.softmax(T.dot(input, self.W) + self.b) | 103 | 103 |
| 104 | 104 | # symbolic description of how to compute prediction as class whose | |
Collapse file Copy file name to clipboardExpand all lines: code/mlp.py +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -296,9 +296,9 @@ def test_mlp(learning_rate=0.01, L1_reg=0.00, L2_reg=0.0001, n_epochs=1000, | 296 | 296 | # specify how to update the parameters of the model as a list of | 297 | 297 | # (variable, update expression) pairs | 298 | 298 |
| 299 | | - # given two list the zip A = [a1, a2, a3, a4] and B = [b1, b2, b3, b4] of | 300 | | - # same length, zip generates a list C of same size, where each element | 301 | | - # is a pair formed from the two lists : | | 299 | + # given two lists of the same length, A = [a1, a2, a3, a4] and | | 300 | + # B = [b1, b2, b3, b4], zip generates a list C of same size, where each | | 301 | + # element is a pair formed from the two lists : | 302 | 302 | # C = [(a1, b1), (a2, b2), (a3, b3), (a4, b4)] | 303 | 303 | updates = [ | 304 | 304 | (param, param - learning_rate * gparam) | |
Collapse file Copy file name to clipboardExpand all lines: doc/gettingstarted.txt +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -104,7 +104,7 @@ MNIST Dataset | 104 | 104 | Since now the data is in one variable, and a minibatch is defined as a | 105 | 105 | slice of that variable, it comes more natural to define a minibatch by | 106 | 106 | indicating its index and its size. In our setup the batch size stays constant | 107 | | - through out the execution of the code, therefore a function will actually | | 107 | + throughout the execution of the code, therefore a function will actually | 108 | 108 | require only the index to identify on which datapoints to work. | 109 | 109 | The code below shows how to store your data and how to | 110 | 110 | access a minibatch: | @@ -141,8 +141,8 @@ MNIST Dataset | 141 | 141 |
| 142 | 142 | # accessing the third minibatch of the training set | 143 | 143 |
| 144 | | - data = train_set_x[2 * 500: 3 * 500] | 145 | | - label = train_set_y[2 * 500: 3 * 500] | | 144 | + data = train_set_x[2 * batch_size: 3 * batch_size] | | 145 | + label = train_set_y[2 * batch_size: 3 * batch_size] | 146 | 146 |
| 147 | 147 |
| 148 | 148 | The data has to be stored as floats on the GPU ( the right | |
Collapse file Copy file name to clipboardExpand all lines: doc/rnnslu.txt +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -101,7 +101,7 @@ Raw input encoding | 101 | 101 |
| 102 | 102 | A token corresponds to a word. Each token in the ATIS vocabulary is associated to an index. Each sentence is a | 103 | 103 | array of indexes (``int32``). Then, each set (train, valid, test) is a list of arrays of indexes. A python | 104 | | -dictionnary is defined for mapping the space of indexes to the space of words. | | 104 | +dictionary is defined for mapping the space of indexes to the space of words. | 105 | 105 |
| 106 | 106 | >>> sentence | 107 | 107 | array([383, 189, 13, 193, 208, 307, 195, 502, 260, 539, | @@ -224,7 +224,7 @@ The **parameters** of the E-RNN to be learned are: | 224 | 224 | * the word embeddings (real-valued matrix) | 225 | 225 | * the initial hidden state (real-value vector) | 226 | 226 | * two matrices for the linear projection of the input ``t`` and the previous hidden layer state ``t-1`` | 227 | | -* (optionnal) bias. `Recommendation <http://en.wikipedia.org/wiki/Occam's_razor>`_: don't use it. | | 227 | +* (optional) bias. `Recommendation <http://en.wikipedia.org/wiki/Occam's_razor>`_: don't use it. | 228 | 228 | * softmax classification layer on top | 229 | 229 |
| 230 | 230 | The **hyperparameters** define the whole architecture: | @@ -282,7 +282,7 @@ the true labels and compute some metrics. In this `repo | 282 | 282 | <http://www.cnts.ua.ac.be/conll2000/chunking/conlleval.txt>`_ PERL script. | 283 | 283 | It's not trivial to compute those metrics due to the `Inside Outside Beginning | 284 | 284 | (IOB) <http://en.wikipedia.org/wiki/Inside_Outside_Beginning>`_ representation | 285 | | -i.e. a prediction is considered correct if the word-beginnin **and** the | | 285 | +i.e. a prediction is considered correct if the word-beginning **and** the | 286 | 286 | word-inside **and** the word-outside predictions are **all** correct. | 287 | 287 | Note that the extension is `txt` and you will have to change it to `pl`. | 288 | 288 |
| |
|