You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here, ``network.outputs`` is the 10 identity outputs from the network (in one hot format), ``y_op`` is the integer
372
-
output represents the class index. While ``cost`` is the cross-entropy between target and predicted labels.
372
+
output represents the class index. While ``cost`` is the cross-entropy between the target and the predicted labels.
373
373
374
374
Denoising Autoencoder (DAE)
375
375
--------------------------------------
376
376
377
377
Autoencoder is an unsupervised learning model which is able to extract representative features,
378
378
it has become more widely used for learning generative models of data and Greedy layer-wise pre-train.
379
-
For vanilla Autoencoder see `Deeplearning Tutorial`_.
379
+
For vanilla Autoencoder, see `Deeplearning Tutorial`_.
380
380
381
381
The script ``main_test_denoise_AE()`` implements a Denoising Autoencoder with corrosion rate of 50%.
382
382
The Autoencoder can be defined as follow, where an Autoencoder is represented by a ``DenseLayer``:
@@ -395,9 +395,9 @@ The Autoencoder can be defined as follow, where an Autoencoder is represented by
395
395
To train the ``DenseLayer``, simply run ``ReconLayer.pretrain()``, if using denoising Autoencoder, the name of
396
396
corrosion layer (a ``DropoutLayer``) need to be specified as follow. To save the feature images, set ``save`` to ``True``.
397
397
There are many kinds of pre-train metrices according to different architectures and applications. For sigmoid activation,
398
-
the Autoencoder can be implemented by using KL divergence, while for rectifer, L1 regularization of activation outputs
398
+
the Autoencoder can be implemented by using KL divergence, while for rectifier, L1 regularization of activation outputs
399
399
can make the output to be sparse. So the default behaviour of ``ReconLayer`` only provide KLD and cross-entropy for sigmoid
400
-
activation function and L1 of activation outputs and mean-squared-error for rectifing activation function.
400
+
activation function and L1 of activation outputs and mean-squared-error for rectifying activation function.
401
401
We recommend you to modify ``ReconLayer`` to achieve your own pre-train metrice.
402
402
403
403
.. code-block:: python
@@ -486,7 +486,7 @@ see :mod:`tensorlayer.cost` for more.
486
486
Apart from using ``network.all_params`` to get the variables, we can also use ``tl.layers.get_variables_with_name`` to get the specific variables by string name.
487
487
488
488
Having the model and the loss function here, we create update expression/operation
489
-
for training the network. TensorLayer do not provide many optimizers, we used TensorFlow's
489
+
for training the network. TensorLayer does not provide many optimizers, we used TensorFlow's
490
490
optimizer instead:
491
491
492
492
.. code-block:: python
@@ -505,7 +505,7 @@ For training the network, we fed data and the keeping probabilities to the ``fee
505
505
sess.run(train_op, feed_dict=feed_dict)
506
506
507
507
While, for validation and testing, we use slightly different way. All
508
-
Dropout, Dropconnect, Corrosion layers need to be disable.
508
+
Dropout, Dropconnect, Corrosion layers need to be disabled.
509
509
We use ``tl.utils.dict_to_one`` to set all ``network.all_drop`` to 1.
510
510
511
511
.. code-block:: python
@@ -593,9 +593,9 @@ If everything is set up correctly, you will get an output like the following:
593
593
episode 1: game 5 took 0.17348s, reward: -1.000000
594
594
episode 1: game 6 took 0.09415s, reward: -1.000000
595
595
596
-
This example allow neural network to learn how to play Pong game from the screen inputs,
596
+
This example allows the neural network to learn how to play Pong game from the screen inputs,
597
597
just like human behavior.
598
-
The neural network will play with a fake AI player, and lean to beat it.
598
+
The neural network will play with a fake AI player and learn to beat it.
599
599
After training for 15,000 episodes, the neural network can
600
600
win 20% of the games. The neural network win 35% of the games at 20,000 episode,
601
601
we can seen the neural network learn faster and faster as it has more winning data to
@@ -994,7 +994,7 @@ Understand LSTM
994
994
Recurrent Neural Network
995
995
-------------------------
996
996
997
-
We personally think Andrey Karpathy's blog is the best material to
997
+
We personally think Andrej Karpathy's blog is the best material to
998
998
`Understand Recurrent Neural Network`_ , after reading that, Colah's blog can
999
999
help you to `Understand LSTM Network`_ `[chinese] <http://dataunion.org/9331.html>`_
1000
1000
which can solve The Problem of Long-Term
@@ -1003,7 +1003,7 @@ before you go on.
1003
1003
1004
1004
.. image:: my_figs/karpathy_rnn.jpeg
1005
1005
1006
-
Image by Andrey Karpathy
1006
+
Image by Andrej Karpathy
1007
1007
1008
1008
1009
1009
Synced sequence input and output
@@ -1283,7 +1283,7 @@ In Example page, we provide many examples include Seq2seq, different type of Adv
1283
1283
This script is going to training a neural network to translate English to French.
1284
1284
If everything is correct, you will see.
1285
1285
1286
-
- Download WMT English-to-French translation data, includes training and testing data.
1286
+
- Download the WMT English-to-French translation data, it includes both the training and the testing data.
1287
1287
- Create vocabulary files for English and French from training data.
1288
1288
- Create the tokenized training and testing data from original training and
1289
1289
testing data.
@@ -1706,7 +1706,7 @@ In Example page, we provide many examples include Seq2seq, different type of Adv
1706
1706
---------
1707
1707
1708
1708
Sequence to sequence model is commonly be used to translate a language to another.
1709
-
Actually it can do many thing you can't imagine, we can translate
1709
+
Actually, it can do many thing you can't imagine, we can translate
1710
1710
a long sentence into short and simple sentence, for example, translation going
1711
1711
from Shakespeare to modern English.
1712
1712
With CNN, we can also translate a video into a sentence, i.e. video captioning.
@@ -1807,7 +1807,7 @@ In Example page, we provide many examples include Seq2seq, different type of Adv
1807
1807
1808
1808
buckets = [(5, 10), (10, 15), (20, 25), (40, 50)]
1809
1809
1810
-
If the input is an English sentence with ``3`` tokens, and the corresponding
1810
+
If the input is an English sentence with ``3`` tokens and the corresponding
1811
1811
output is a French sentence with ``6`` tokens, then they will be put in the
1812
1812
first bucket and padded to length ``5`` for encoder inputs (English sentence),
0 commit comments