Fixed typos in documentation & READMEs (#10365)

This commit is contained in:
Lakshay Garg 2017-06-07 05:27:40 +05:30 committed by Jonathan Hseu
parent 94dc1dbfa2
commit ab5f38560c
23 changed files with 41 additions and 41 deletions

View File

@ -1,2 +1,2 @@
Common utilites and abstractions for handling and emitting LLVM IR for XLA Common utilities and abstractions for handling and emitting LLVM IR for XLA
backends. backends.

View File

@ -273,7 +273,7 @@ features.
* The parameters of the kernel mapping are often data-dependent. Model quality * The parameters of the kernel mapping are often data-dependent. Model quality
can be very sensitive to these parameters. Use hyperparameter tuning to find the can be very sensitive to these parameters. Use hyperparameter tuning to find the
optimal values. optimal values.
* If you have multiple numerical features, concatinate them into a single * If you have multiple numerical features, concatenate them into a single
multi-dimensional feature and apply the kernel mapping to the concatenated multi-dimensional feature and apply the kernel mapping to the concatenated
vector. vector.

View File

@ -159,7 +159,7 @@ expected.
On criteo dataset, the usual Newton method goes out of range for a small (but On criteo dataset, the usual Newton method goes out of range for a small (but
non negligible) fraction of the examples. The returned dual in these cases will non negligible) fraction of the examples. The returned dual in these cases will
be $$0$$ or $$\pm 1$$. The modified Newton algorihm always find the true zero be $$0$$ or $$\pm 1$$. The modified Newton algorithm always find the true zero
and achieves a better log loss. and achieves a better log loss.
The blue lines represent the modified Newton (evaluation and training) and the The blue lines represent the modified Newton (evaluation and training) and the

View File

@ -12,10 +12,10 @@ All loss functions take a pair of tensors, `predictions` and ground truth
`[batch_size, d1, ... dN]` where `batch_size` is the number `[batch_size, d1, ... dN]` where `batch_size` is the number
of samples in the batch and `d1` ... `dN` are the remaining dimensions. of samples in the batch and `d1` ... `dN` are the remaining dimensions.
THe `weight` parameter can be used to adjust the relative weight samples within The `weight` parameter can be used to adjust the relative weight samples within
the batch. The result of each loss is a scalar average of all sample losses with the batch. The result of each loss is a scalar average of all sample losses with
non-zero weights. non-zero weights.
Any parameter named `logit` should be the raw model outputs, not a normalized Any parameter named `logit` should be the raw model outputs, not a normalized
probablility distribution (i.e., `[0.0, 1.0]`). `target` for losses taking probability distribution (i.e., `[0.0, 1.0]`). `target` for losses taking
`logit` _should_ be a normalized probability distribution. `logit` _should_ be a normalized probability distribution.

View File

@ -1,6 +1,6 @@
# tfprof: A Profiling Tool for TensorFlow Models # tfprof: A Profiling Tool for TensorFlow Models
# Full Docment in tensorflow/tools/tfprof/README.md # Full Document in tensorflow/tools/tfprof/README.md
Author: Xin Pan (xpan@google.com, github: panyx0718), Jon Shlens, Yao Zhang Author: Xin Pan (xpan@google.com, github: panyx0718), Jon Shlens, Yao Zhang

View File

@ -111,7 +111,7 @@ Here are some of the properties controlled by a `Scope` object:
Please refer to @{tensorflow::Scope} for the complete list of member functions Please refer to @{tensorflow::Scope} for the complete list of member functions
that let you create child scopes with new properties. that let you create child scopes with new properties.
### Operation Construtors ### Operation Constructors
You can create graph operations with operation constructors, one C++ class per You can create graph operations with operation constructors, one C++ class per
TensorFlow operation. Unlike the Python API which uses snake-case to name the TensorFlow operation. Unlike the Python API which uses snake-case to name the

View File

@ -9,7 +9,7 @@ Subclasses of `LinearOperator` provide a access to common methods on a
(batch) matrix, without the need to materialize the matrix. This allows: (batch) matrix, without the need to materialize the matrix. This allows:
* Matrix free computations * Matrix free computations
* Different operators to take advantage of special strcture, while providing a * Different operators to take advantage of special structure, while providing a
consistent API to users. consistent API to users.
### Base class ### Base class

View File

@ -54,7 +54,7 @@ the following:
### Create a `tf.train.ClusterSpec` to describe the cluster ### Create a `tf.train.ClusterSpec` to describe the cluster
The cluster specification dictionary maps job names to lists of network The cluster specification dictionary maps job names to lists of network
adresses. Pass this dictionary to addresses. Pass this dictionary to
the @{tf.train.ClusterSpec} the @{tf.train.ClusterSpec}
constructor. For example: constructor. For example:

View File

@ -303,7 +303,7 @@ The `model_fn` must accept three arguments:
`model_fn` may also accept a `params` argument containing a dict of `model_fn` may also accept a `params` argument containing a dict of
hyperparameters used for training (as shown in the skeleton above). hyperparameters used for training (as shown in the skeleton above).
The body of the function perfoms the following tasks (described in detail in the The body of the function performs the following tasks (described in detail in the
sections that follow): sections that follow):
* Configuring the model—here, for the abalone predictor, this will be a neural * Configuring the model—here, for the abalone predictor, this will be a neural
@ -371,7 +371,7 @@ layer.
The input layer is a series of nodes (one for each feature in the model) that The input layer is a series of nodes (one for each feature in the model) that
will accept the feature data that is passed to the `model_fn` in the `features` will accept the feature data that is passed to the `model_fn` in the `features`
argument. If `features` contains an n-dimenional `Tensor` with all your feature argument. If `features` contains an n-dimensional `Tensor` with all your feature
data (which is the case if `x` and `y` `Dataset`s are passed to `fit()`, data (which is the case if `x` and `y` `Dataset`s are passed to `fit()`,
`evaluate()`, and `predict()` directly), then it can serve as the input layer. `evaluate()`, and `predict()` directly), then it can serve as the input layer.
If `features` contains a dict of @{$linear#feature-columns-and-transformations$feature columns} passed to If `features` contains a dict of @{$linear#feature-columns-and-transformations$feature columns} passed to

View File

@ -29,7 +29,7 @@ into broad categories:
are modified. are modified.
- *Gradients (AKA automatic differentiation)*: Given a graph and a list of - *Gradients (AKA automatic differentiation)*: Given a graph and a list of
input and output operations, add operations to the graph that compute the input and output operations, add operations to the graph that compute the
partial deriviatives (gradients) of the inputs with respect to the outputs. partial derivatives (gradients) of the inputs with respect to the outputs.
Allows for customization of the gradient function for a particular operation Allows for customization of the gradient function for a particular operation
in the graph. in the graph.
- *Functions*: Define a subgraph that may be called in multiple places in the - *Functions*: Define a subgraph that may be called in multiple places in the

View File

@ -392,7 +392,7 @@ The differences are that:
- We will add logging to every 100th iteration in the training process. - We will add logging to every 100th iteration in the training process.
We will also use tf.Session rather than tf.InteractiveSession. This better We will also use tf.Session rather than tf.InteractiveSession. This better
separates the process of creating the graph (model sepecification) and the separates the process of creating the graph (model specification) and the
process of evaluating the graph (model fitting). It generally makes for cleaner process of evaluating the graph (model fitting). It generally makes for cleaner
code. The tf.Session is created within a [`with` block](https://docs.python.org/3/whatsnew/2.6.html#pep-343-the-with-statement) code. The tf.Session is created within a [`with` block](https://docs.python.org/3/whatsnew/2.6.html#pep-343-the-with-statement)
so that it is automatically destroyed once the block is exited. so that it is automatically destroyed once the block is exited.

View File

@ -216,7 +216,7 @@ and Mac OS X:
<pre><b>java -cp libtensorflow-1.2.0-rc1.jar:. -Djava.library.path=./jni HelloTF</b></pre> <pre><b>java -cp libtensorflow-1.2.0-rc1.jar:. -Djava.library.path=./jni HelloTF</b></pre>
And the following comand line executes the `HelloTF` program on Windows: And the following command line executes the `HelloTF` program on Windows:
<pre><b>java -cp libtensorflow-1.2.0-rc1.jar;. -Djava.library.path=jni HelloTF</b></pre> <pre><b>java -cp libtensorflow-1.2.0-rc1.jar;. -Djava.library.path=jni HelloTF</b></pre>

View File

@ -92,7 +92,7 @@ addition to the batch sizes listed in the table, InceptionV3, ResNet-50,
ResNet-152, and VGG16 were tested with a batch size of 32. Those results are in ResNet-152, and VGG16 were tested with a batch size of 32. Those results are in
the *other results* section. the *other results* section.
Options | InceptionV3 | ResNet-50 | ResNet-152 | Alexnet | VGG16 Options | InceptionV3 | ResNet-50 | ResNet-152 | AlexNet | VGG16
------------------ | ----------- | --------- | ---------- | ------- | ----- ------------------ | ----------- | --------- | ---------- | ------- | -----
Batch size per GPU | 64 | 64 | 64 | 512 | 64 Batch size per GPU | 64 | 64 | 64 | 512 | 64
Optimizer | sgd | sgd | sgd | sgd | sgd Optimizer | sgd | sgd | sgd | sgd | sgd
@ -120,7 +120,7 @@ VGG16 | replicated (with NCCL) | n/a
**Training synthetic data** **Training synthetic data**
GPUs | InceptionV3 | ResNet-50 | ResNet-152 | Alexnet | VGG16 GPUs | InceptionV3 | ResNet-50 | ResNet-152 | AlexNet | VGG16
---- | ----------- | --------- | ---------- | ------- | ----- ---- | ----------- | --------- | ---------- | ------- | -----
1 | 142 | 219 | 91.8 | 2987 | 154 1 | 142 | 219 | 91.8 | 2987 | 154
2 | 284 | 422 | 181 | 5658 | 295 2 | 284 | 422 | 181 | 5658 | 295
@ -129,7 +129,7 @@ GPUs | InceptionV3 | ResNet-50 | ResNet-152 | Alexnet | VGG16
**Training real data** **Training real data**
GPUs | InceptionV3 | ResNet-50 | ResNet-152 | Alexnet | VGG16 GPUs | InceptionV3 | ResNet-50 | ResNet-152 | AlexNet | VGG16
---- | ----------- | --------- | ---------- | ------- | ----- ---- | ----------- | --------- | ---------- | ------- | -----
1 | 142 | 218 | 91.4 | 2890 | 154 1 | 142 | 218 | 91.4 | 2890 | 154
2 | 278 | 425 | 179 | 4448 | 284 2 | 278 | 425 | 179 | 4448 | 284
@ -182,7 +182,7 @@ addition to the batch sizes listed in the table, InceptionV3 and ResNet-50 were
tested with a batch size of 32. Those results are in the *other results* tested with a batch size of 32. Those results are in the *other results*
section. section.
Options | InceptionV3 | ResNet-50 | ResNet-152 | Alexnet | VGG16 Options | InceptionV3 | ResNet-50 | ResNet-152 | AlexNet | VGG16
------------------ | ----------- | --------- | ---------- | ------- | ----- ------------------ | ----------- | --------- | ---------- | ------- | -----
Batch size per GPU | 64 | 64 | 32 | 512 | 32 Batch size per GPU | 64 | 64 | 32 | 512 | 32
Optimizer | sgd | sgd | sgd | sgd | sgd Optimizer | sgd | sgd | sgd | sgd | sgd
@ -199,7 +199,7 @@ The configuration used for each model was `variable_update` equal to
**Training synthetic data** **Training synthetic data**
GPUs | InceptionV3 | ResNet-50 | ResNet-152 | Alexnet | VGG16 GPUs | InceptionV3 | ResNet-50 | ResNet-152 | AlexNet | VGG16
---- | ----------- | --------- | ---------- | ------- | ----- ---- | ----------- | --------- | ---------- | ------- | -----
1 | 30.5 | 51.9 | 20.0 | 656 | 35.4 1 | 30.5 | 51.9 | 20.0 | 656 | 35.4
2 | 57.8 | 99.0 | 38.2 | 1209 | 64.8 2 | 57.8 | 99.0 | 38.2 | 1209 | 64.8
@ -208,7 +208,7 @@ GPUs | InceptionV3 | ResNet-50 | ResNet-152 | Alexnet | VGG16
**Training real data** **Training real data**
GPUs | InceptionV3 | ResNet-50 | ResNet-152 | Alexnet | VGG16 GPUs | InceptionV3 | ResNet-50 | ResNet-152 | AlexNet | VGG16
---- | ----------- | --------- | ---------- | ------- | ----- ---- | ----------- | --------- | ---------- | ------- | -----
1 | 30.6 | 51.2 | 20.0 | 639 | 34.2 1 | 30.6 | 51.2 | 20.0 | 639 | 34.2
2 | 58.4 | 98.8 | 38.3 | 1136 | 62.9 2 | 58.4 | 98.8 | 38.3 | 1136 | 62.9
@ -257,7 +257,7 @@ addition to the batch sizes listed in the table, InceptionV3 and ResNet-50 were
tested with a batch size of 32. Those results are in the *other results* tested with a batch size of 32. Those results are in the *other results*
section. section.
Options | InceptionV3 | ResNet-50 | ResNet-152 | Alexnet | VGG16 Options | InceptionV3 | ResNet-50 | ResNet-152 | AlexNet | VGG16
------------------ | ----------- | --------- | ---------- | ------- | ----- ------------------ | ----------- | --------- | ---------- | ------- | -----
Batch size per GPU | 64 | 64 | 32 | 512 | 32 Batch size per GPU | 64 | 64 | 32 | 512 | 32
Optimizer | sgd | sgd | sgd | sgd | sgd Optimizer | sgd | sgd | sgd | sgd | sgd
@ -281,7 +281,7 @@ VGG16 | parameter_server | gpu
**Training synthetic data** **Training synthetic data**
GPUs | InceptionV3 | ResNet-50 | ResNet-152 | Alexnet | VGG16 GPUs | InceptionV3 | ResNet-50 | ResNet-152 | AlexNet | VGG16
---- | ----------- | --------- | ---------- | ------- | ----- ---- | ----------- | --------- | ---------- | ------- | -----
1 | 30.8 | 51.5 | 19.7 | 684 | 36.3 1 | 30.8 | 51.5 | 19.7 | 684 | 36.3
2 | 58.7 | 98.0 | 37.6 | 1244 | 69.4 2 | 58.7 | 98.0 | 37.6 | 1244 | 69.4
@ -290,7 +290,7 @@ GPUs | InceptionV3 | ResNet-50 | ResNet-152 | Alexnet | VGG16
**Training real data** **Training real data**
GPUs | InceptionV3 | ResNet-50 | ResNet-152 | Alexnet | VGG16 GPUs | InceptionV3 | ResNet-50 | ResNet-152 | AlexNet | VGG16
---- | ----------- | --------- | ---------- | ------- | ----- ---- | ----------- | --------- | ---------- | ------- | -----
1 | 30.5 | 51.3 | 19.7 | 674 | 36.3 1 | 30.5 | 51.3 | 19.7 | 674 | 36.3
2 | 59.0 | 94.9 | 38.2 | 1227 | 67.5 2 | 59.0 | 94.9 | 38.2 | 1227 | 67.5

View File

@ -133,7 +133,7 @@ Benefits of using this scheme:
## Best Practices in Building High-Performance Models ## Best Practices in Building High-Performance Models
Collected below are a couple of additional best practices that can improve Collected below are a couple of additional best practices that can improve
performance and increase the flexiblity of models. performance and increase the flexibility of models.
### Build the model with both NHWC and NCHW ### Build the model with both NHWC and NCHW

View File

@ -153,7 +153,7 @@ bit.
The min and max operations actually look at the values in the input float The min and max operations actually look at the values in the input float
tensor, and then feeds them into the Dequantize operation that converts the tensor, and then feeds them into the Dequantize operation that converts the
tensor into eight-bits. There're more details on how the quantized representation tensor into eight-bits. There are more details on how the quantized representation
works later on. works later on.
Once the individual operations have been converted, the next stage is to remove Once the individual operations have been converted, the next stage is to remove

View File

@ -189,7 +189,7 @@ operation for that variable in a session. It is destroyed when that
Variables allow concurrent read and write operations. The value read from a Variables allow concurrent read and write operations. The value read from a
variable may change if it is concurrently updated. By default, concurrent variable may change if it is concurrently updated. By default, concurrent
assigment operations to a variable are allowed to run with no mutual exclusion. assignment operations to a variable are allowed to run with no mutual exclusion.
To acquire a lock when assigning to a variable, pass `use_locking=True` to To acquire a lock when assigning to a variable, pass `use_locking=True` to
@{tf.Variable.assign}. @{tf.Variable.assign}.

View File

@ -189,7 +189,7 @@ inputs that match the dtype and shape of the model signature.
By default, SavedModel CLI will print outputs to console. If a directory is By default, SavedModel CLI will print outputs to console. If a directory is
passed to `--outdir` option, the outputs will be saved as npy files named after passed to `--outdir` option, the outputs will be saved as npy files named after
output tensor keys under the given directory. Use `--overwite` to overwrite output tensor keys under the given directory. Use `--overwrite` to overwrite
existing output files. existing output files.
#### TensorFlow Debugger (tfdbg) Integration #### TensorFlow Debugger (tfdbg) Integration

View File

@ -203,15 +203,15 @@ Example: Call `my_additional_summaries()` every 20mn:
```python ```python
def my_additional_sumaries(sv, sess): def my_additional_summaries(sv, sess):
...fetch and write summaries, see below... ...fetch and write summaries, see below...
... ...
sv = tf.train.Supervisor(logdir="/my/training/directory") sv = tf.train.Supervisor(logdir="/my/training/directory")
with sv.managed_session() as sess: with sv.managed_session() as sess:
# Call my_additional_sumaries() every 1200s, or 20mn, # Call my_additional_summaries() every 1200s, or 20mn,
# passing (sv, sess) as arguments. # passing (sv, sess) as arguments.
sv.loop(1200, my_additional_sumaries, args=(sv, sess)) sv.loop(1200, my_additional_summaries, args=(sv, sess))
...main training loop... ...main training loop...
``` ```
@ -226,11 +226,11 @@ better when only one events file in a directory is being actively appended to.
The supervisor provides a helper function to append summaries: The supervisor provides a helper function to append summaries:
@{tf.train.Supervisor.summary_computed}. @{tf.train.Supervisor.summary_computed}.
Just pass to the function the output returned by a summary op. Here is an Just pass to the function the output returned by a summary op. Here is an
example of using that function to implement `my_additional_sumaries()` from the example of using that function to implement `my_additional_summaries()` from the
previous example: previous example:
```python ```python
def my_additional_sumaries(sv, sess): def my_additional_summaries(sv, sess):
summaries = sess.run(my_additional_summary_op) summaries = sess.run(my_additional_summary_op)
sv.summary_computed(sess, summaries) sv.summary_computed(sess, summaries)
``` ```

View File

@ -106,7 +106,7 @@ hooks = [tf_debug.DumpingDebugHook("/shared/storage/location/tfdbg_dumps_1")]
``` ```
Then this `hook` can be used in the same way as the `LocalCLIDebugHook` examples Then this `hook` can be used in the same way as the `LocalCLIDebugHook` examples
above. As the training and/or evalution of `Estimator` or `Experiment` above. As the training and/or evaluation of `Estimator` or `Experiment`
happens, directories of the naming pattern happens, directories of the naming pattern
`/shared/storage/location/tfdbg_dumps_1/run_<epoch_timestamp_microsec>_<uuid>` `/shared/storage/location/tfdbg_dumps_1/run_<epoch_timestamp_microsec>_<uuid>`
will appear. Each directory corresponds to a `Session.run()` call that underlies will appear. Each directory corresponds to a `Session.run()` call that underlies

View File

@ -121,7 +121,7 @@ example = ...ops to create one example...
# Create a queue, and an op that enqueues examples one at a time in the queue. # Create a queue, and an op that enqueues examples one at a time in the queue.
queue = tf.RandomShuffleQueue(...) queue = tf.RandomShuffleQueue(...)
enqueue_op = queue.enqueue(example) enqueue_op = queue.enqueue(example)
# Create a training graph that starts by dequeuing a batch of examples. # Create a training graph that starts by dequeueing a batch of examples.
inputs = queue.dequeue_many(batch_size) inputs = queue.dequeue_many(batch_size)
train_op = ...use 'inputs' to build the training part of the graph... train_op = ...use 'inputs' to build the training part of the graph...
``` ```

View File

@ -585,7 +585,7 @@ hand-drawn digits) and training labels (the corresponding value from 09 for
each image) as [numpy each image) as [numpy
arrays](https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html) arrays](https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html)
in `train_data` and `train_labels`, respectively. Similarly, we store the in `train_data` and `train_labels`, respectively. Similarly, we store the
evalulation feature data (10,000 images) and evaluation labels in `eval_data` evaluation feature data (10,000 images) and evaluation labels in `eval_data`
and `eval_labels`, respectively. and `eval_labels`, respectively.
### Create the Estimator {#create-the-estimator} ### Create the Estimator {#create-the-estimator}

View File

@ -586,7 +586,7 @@ equivalent, followed by a float conversion op so that the result is usable by
subsequent nodes. This is mostly useful for [shrinking file subsequent nodes. This is mostly useful for [shrinking file
sizes](#shrinking-file-size), but also helps with the more advanced sizes](#shrinking-file-size), but also helps with the more advanced
[quantize_nodes](#quantize_nodes) transform. Even though there are no [quantize_nodes](#quantize_nodes) transform. Even though there are no
prerequesites, it is advisable to run [fold_batch_norms](#fold_batch_norms) or prerequisites, it is advisable to run [fold_batch_norms](#fold_batch_norms) or
[fold_old_batch_norms](#fold_old_batch_norms), because rounding variances down [fold_old_batch_norms](#fold_old_batch_norms), because rounding variances down
to zero may cause significant loss of precision. to zero may cause significant loss of precision.
@ -674,7 +674,7 @@ number of steps. The unique values are chosen per buffer by linearly allocating
between the largest and smallest values present. This is useful when you'll be between the largest and smallest values present. This is useful when you'll be
deploying on mobile, and you want a model that will compress effectively. See deploying on mobile, and you want a model that will compress effectively. See
[shrinking file size](#shrinking-file-size) for more details. Even though there [shrinking file size](#shrinking-file-size) for more details. Even though there
are no prerequesites, it is advisable to run are no prerequisites, it is advisable to run
[fold_batch_norms](#fold_batch_norms) or [fold_batch_norms](#fold_batch_norms) or
[fold_old_batch_norms](#fold_old_batch_norms), because rounding variances down [fold_old_batch_norms](#fold_old_batch_norms), because rounding variances down
to zero may cause significant loss of precision. to zero may cause significant loss of precision.

View File

@ -603,15 +603,15 @@ provides checkpointed tensors' values.
`-order_by`: Order the results by [name|depth|bytes|micros|params|float_ops|occurrence] `-order_by`: Order the results by [name|depth|bytes|micros|params|float_ops|occurrence]
`-account_type_regexes`: Account and display the ops whose types match one of the type regexes specified. tfprof allow user to define extra op types for ops through tensorflow.tfprof.OpLog proto. regexes are comma-sperated. `-account_type_regexes`: Account and display the ops whose types match one of the type regexes specified. tfprof allow user to define extra op types for ops through tensorflow.tfprof.OpLog proto. regexes are comma-separated.
`-start_name_regexes`: Show ops starting from the ops that matches the regexes, recursively. regexes are comma-separated. `-start_name_regexes`: Show ops starting from the ops that matches the regexes, recursively. regexes are comma-separated.
`-trim_name_regexes`: Hide ops starting from the ops that matches the regexes, recursively, regexes are comma-seprated. `-trim_name_regexes`: Hide ops starting from the ops that matches the regexes, recursively, regexes are comma-separated.
`-show_name_regexes`: Show ops that match the regexes. regexes are comma-seprated. `-show_name_regexes`: Show ops that match the regexes. regexes are comma-separated.
`-hide_name_regexes`: Hide ops that match the regexes. regexes are comma-seprated. `-hide_name_regexes`: Hide ops that match the regexes. regexes are comma-separated.
Notes: For each op, `-account_type_regexes` is first evaluated, only ops with Notes: For each op, `-account_type_regexes` is first evaluated, only ops with
types matching the specified regexes are accounted and selected for displayed. types matching the specified regexes are accounted and selected for displayed.