Explorar o código

fix some typos

Yunfeng Wang %!s(int64=8) %!d(string=hai) anos
pai
achega
13ac098f12

+ 1 - 1
examples/2_BasicModels/logistic_regression.py

@@ -11,7 +11,7 @@ from __future__ import print_function
 
 
 import tensorflow as tf
 import tensorflow as tf
 
 
-# Import MINST data
+# Import MNIST data
 from tensorflow.examples.tutorials.mnist import input_data
 from tensorflow.examples.tutorials.mnist import input_data
 mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)
 mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)
 
 

+ 1 - 1
examples/2_BasicModels/nearest_neighbor.py

@@ -12,7 +12,7 @@ from __future__ import print_function
 import numpy as np
 import numpy as np
 import tensorflow as tf
 import tensorflow as tf
 
 
-# Import MINST data
+# Import MNIST data
 from tensorflow.examples.tutorials.mnist import input_data
 from tensorflow.examples.tutorials.mnist import input_data
 mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)
 mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)
 
 

+ 1 - 1
examples/3_NeuralNetworks/autoencoder.py

@@ -15,7 +15,7 @@ import tensorflow as tf
 import numpy as np
 import numpy as np
 import matplotlib.pyplot as plt
 import matplotlib.pyplot as plt
 
 
-# Import MINST data
+# Import MNIST data
 from tensorflow.examples.tutorials.mnist import input_data
 from tensorflow.examples.tutorials.mnist import input_data
 mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)
 mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)
 
 

+ 4 - 4
examples/3_NeuralNetworks/bidirectional_rnn.py

@@ -1,5 +1,5 @@
 '''
 '''
-A Bidirectional Reccurent Neural Network (LSTM) implementation example using TensorFlow library.
+A Bidirectional Recurrent Neural Network (LSTM) implementation example using TensorFlow library.
 This example is using the MNIST database of handwritten digits (http://yann.lecun.com/exdb/mnist/)
 This example is using the MNIST database of handwritten digits (http://yann.lecun.com/exdb/mnist/)
 Long Short Term Memory paper: http://deeplearning.cs.cmu.edu/pdfs/Hochreiter97_lstm.pdf
 Long Short Term Memory paper: http://deeplearning.cs.cmu.edu/pdfs/Hochreiter97_lstm.pdf
 
 
@@ -13,12 +13,12 @@ import tensorflow as tf
 from tensorflow.python.ops import rnn, rnn_cell
 from tensorflow.python.ops import rnn, rnn_cell
 import numpy as np
 import numpy as np
 
 
-# Import MINST data
+# Import MNIST data
 from tensorflow.examples.tutorials.mnist import input_data
 from tensorflow.examples.tutorials.mnist import input_data
 mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)
 mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)
 
 
 '''
 '''
-To classify images using a bidirectional reccurent neural network, we consider
+To classify images using a bidirectional recurrent neural network, we consider
 every image row as a sequence of pixels. Because MNIST image shape is 28*28px,
 every image row as a sequence of pixels. Because MNIST image shape is 28*28px,
 we will then handle 28 sequences of 28 steps for every sample.
 we will then handle 28 sequences of 28 steps for every sample.
 '''
 '''
@@ -41,7 +41,7 @@ y = tf.placeholder("float", [None, n_classes])
 
 
 # Define weights
 # Define weights
 weights = {
 weights = {
-    # Hidden layer weights => 2*n_hidden because of foward + backward cells
+    # Hidden layer weights => 2*n_hidden because of forward + backward cells
     'out': tf.Variable(tf.random_normal([2*n_hidden, n_classes]))
     'out': tf.Variable(tf.random_normal([2*n_hidden, n_classes]))
 }
 }
 biases = {
 biases = {

+ 1 - 1
examples/3_NeuralNetworks/convolutional_network.py

@@ -11,7 +11,7 @@ from __future__ import print_function
 
 
 import tensorflow as tf
 import tensorflow as tf
 
 
-# Import MINST data
+# Import MNIST data
 from tensorflow.examples.tutorials.mnist import input_data
 from tensorflow.examples.tutorials.mnist import input_data
 mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)
 mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)
 
 

+ 3 - 3
examples/3_NeuralNetworks/dynamic_rnn.py

@@ -1,5 +1,5 @@
 '''
 '''
-A Dynamic Reccurent Neural Network (LSTM) implementation example using
+A Dynamic Recurrent Neural Network (LSTM) implementation example using
 TensorFlow library. This example is using a toy dataset to classify linear
 TensorFlow library. This example is using a toy dataset to classify linear
 sequences. The generated sequences have variable length.
 sequences. The generated sequences have variable length.
 
 
@@ -26,7 +26,7 @@ class ToySequenceData(object):
 
 
     NOTICE:
     NOTICE:
     We have to pad each sequence to reach 'max_seq_len' for TensorFlow
     We have to pad each sequence to reach 'max_seq_len' for TensorFlow
-    consistency (we cannot feed a numpy array with unconsistent
+    consistency (we cannot feed a numpy array with inconsistent
     dimensions). The dynamic calculation will then be perform thanks to
     dimensions). The dynamic calculation will then be perform thanks to
     'seqlen' attribute that records every actual sequence length.
     'seqlen' attribute that records every actual sequence length.
     """
     """
@@ -130,7 +130,7 @@ def dynamicRNN(x, seqlen, weights, biases):
                                 sequence_length=seqlen)
                                 sequence_length=seqlen)
 
 
     # When performing dynamic calculation, we must retrieve the last
     # When performing dynamic calculation, we must retrieve the last
-    # dynamically computed output, i.e, if a sequence length is 10, we need
+    # dynamically computed output, i.e., if a sequence length is 10, we need
     # to retrieve the 10th output.
     # to retrieve the 10th output.
     # However TensorFlow doesn't support advanced indexing yet, so we build
     # However TensorFlow doesn't support advanced indexing yet, so we build
     # a custom op that for each sample in batch size, get its length and
     # a custom op that for each sample in batch size, get its length and

+ 1 - 1
examples/3_NeuralNetworks/multilayer_perceptron.py

@@ -9,7 +9,7 @@ Project: https://github.com/aymericdamien/TensorFlow-Examples/
 
 
 from __future__ import print_function
 from __future__ import print_function
 
 
-# Import MINST data
+# Import MNIST data
 from tensorflow.examples.tutorials.mnist import input_data
 from tensorflow.examples.tutorials.mnist import input_data
 mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)
 mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)
 
 

+ 1 - 1
examples/4_Utils/save_restore_model.py

@@ -9,7 +9,7 @@ Project: https://github.com/aymericdamien/TensorFlow-Examples/
 
 
 from __future__ import print_function
 from __future__ import print_function
 
 
-# Import MINST data
+# Import MNIST data
 from tensorflow.examples.tutorials.mnist import input_data
 from tensorflow.examples.tutorials.mnist import input_data
 mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)
 mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)
 
 

+ 2 - 2
examples/4_Utils/tensorboard_advanced.py

@@ -11,7 +11,7 @@ from __future__ import print_function
 
 
 import tensorflow as tf
 import tensorflow as tf
 
 
-# Import MINST data
+# Import MNIST data
 from tensorflow.examples.tutorials.mnist import input_data
 from tensorflow.examples.tutorials.mnist import input_data
 mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)
 mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)
 
 
@@ -64,7 +64,7 @@ biases = {
 }
 }
 
 
 # Encapsulating all ops into scopes, making Tensorboard's Graph
 # Encapsulating all ops into scopes, making Tensorboard's Graph
-# visualization more convenient
+# Visualization more convenient
 with tf.name_scope('Model'):
 with tf.name_scope('Model'):
     # Build model
     # Build model
     pred = multilayer_perceptron(x, weights, biases)
     pred = multilayer_perceptron(x, weights, biases)

+ 1 - 1
examples/4_Utils/tensorboard_basic.py

@@ -11,7 +11,7 @@ from __future__ import print_function
 
 
 import tensorflow as tf
 import tensorflow as tf
 
 
-# Import MINST data
+# Import MNIST data
 from tensorflow.examples.tutorials.mnist import input_data
 from tensorflow.examples.tutorials.mnist import input_data
 mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)
 mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)