Skip to content

Commit f483e39

Browse files
committed
TensorFlow: Upstream latest changes to Git.
Changes: - Updates to installation instructions. - Updates to documentation. - Minor modifications and tests for word2vec. Base CL: 107284192
1 parent c19e4a1 commit f483e39

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1245
-914
lines changed

README.md

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,66 @@ organization for the purposes of conducting machine learning and deep neural
1111
networks research. The system is general enough to be applicable in a wide
1212
variety of other domains, as well.
1313

14+
# Download and Setup
15+
16+
For detailed installation instructions, see
17+
[here](g3doc/get_started/os_setup.md).
18+
19+
## Binary Installation
20+
21+
### Ubuntu/Linux
22+
23+
Make sure you have [pip](https://pypi.python.org/pypi/pip) installed:
24+
25+
```sh
26+
$ sudo apt-get install python-pip
27+
```
28+
29+
Install TensorFlow:
30+
31+
```sh
32+
# For CPU-only version
33+
$ sudo pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
34+
35+
# For GPU-enabled version
36+
$ sudo pip install https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
37+
```
38+
39+
### Mac OS X
40+
41+
Make sure you have [pip](https://pypi.python.org/pypi/pip) installed:
42+
43+
If using `easy_install`:
44+
45+
```sh
46+
$ sudo easy_install pip
47+
```
48+
49+
Install TensorFlow (only CPU binary version is currently available).
50+
51+
```sh
52+
$ sudo pip install https://storage.googleapis.com/tensorflow/mac/tensorflow-0.5.0-py2-none-any.whl
53+
```
54+
55+
### Try your first TensorFlow program
56+
57+
```sh
58+
$ python
59+
60+
>>> import tensorflow as tf
61+
>>> hello = tf.constant('Hello, TensorFlow!')
62+
>>> sess = tf.Session()
63+
>>> print sess.run(hello)
64+
Hello, TensorFlow!
65+
>>> a = tf.constant(10)
66+
>>> b = tf.constant(32)
67+
>>> print sess.run(a+b)
68+
42
69+
>>>
70+
71+
```
72+
73+
1474
##For more information
1575

16-
* [Installation and setup instructions](/tensorflow/g3doc/get_started/os_setup.md)
1776
* [TensorFlow website](http://tensorflow.org)

tensorflow/core/framework/tensor.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import "tensorflow/core/framework/types.proto";
1010
message TensorProto {
1111
DataType dtype = 1;
1212

13-
// Shape of the tensor. TODO(mdevin): sort out the 0-rank issues.
13+
// Shape of the tensor. TODO(touts): sort out the 0-rank issues.
1414
TensorShapeProto tensor_shape = 2;
1515

1616
// Only one of the representations below is set, one of "tensor_contents" and

tensorflow/core/kernels/softmax_op.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ struct SoftmaxEigenImpl {
4646
Eigen::IndexList<Eigen::type2index<1>, int> one_by_class;
4747
one_by_class.set(1, num_classes);
4848
#endif
49-
// NOTE(mdevin): If you modify this implementation please run
49+
// NOTE(touts): If you modify this implementation please run
5050
// the ImageNetSoftmaxFwd benchmark in core_ops_test.cc.
5151
//
5252
// softmax = exp(logits - max(logits along classes));

tensorflow/core/kernels/xent_op.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ struct XentEigenImpl {
3535
typename TTypes<T>::Matrix scratch,
3636
typename TTypes<T>::Vec loss,
3737
typename TTypes<T>::Matrix backprop) {
38-
// NOTE(mdevin): This duplicates some of the computations in softmax_op
38+
// NOTE(touts): This duplicates some of the computations in softmax_op
3939
// because we need the intermediate (logits -max(logits)) values to
4040
// avoid a log(exp()) in the computation of the loss.
4141

tensorflow/core/lib/histogram/histogram.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class ThreadSafeHistogram {
9797

9898
void Clear();
9999

100-
// TODO(mdevin): It might be a good idea to provide a AddN(<many values>)
100+
// TODO(touts): It might be a good idea to provide a AddN(<many values>)
101101
// method to avoid grabbing/releasing the lock when adding many values.
102102
void Add(double value);
103103

tensorflow/core/public/tensor_shape.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class TensorShape {
6363

6464
/// \brief Returns the number of elements in dimension "d".
6565
/// REQUIRES: "0 <= d < dims()"
66-
// TODO(mdevin): Rename to dimension() to match Eigen::Tensor::dimension()?
66+
// TODO(touts): Rename to dimension() to match Eigen::Tensor::dimension()?
6767
int64 dim_size(int d) const {
6868
DCHECK_GE(d, 0);
6969
DCHECK_LT(d, dims());

tensorflow/core/util/event.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ message Event {
1212
// Timestamp of the event.
1313
double wall_time = 1;
1414

15-
// Globale step of the event.
15+
// Global step of the event.
1616
int64 step = 2;
1717

1818
oneof what {

tensorflow/examples/android/README.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ installed the NDK and SDK. Otherwise an error such as:
2020
"The external label '//external:android/sdk' is not bound to anything" will
2121
be reported.
2222

23-
2423
To build the APK, run this from your workspace root:
2524
```
2625
bazel build //tensorflow/examples/android:tensorflow_demo -c opt --copt=-mfpu=neon
@@ -29,11 +28,19 @@ Note that "-c opt" is currently required; if not set, an assert (for an
2928
otherwise non-problematic issue) in Eigen will halt the application during
3029
execution. This issue will be corrected in an upcoming release.
3130

32-
If adb debugging is enabled on your device, you may instead use the following
33-
command from your workspace root to automatically build and install:
31+
If adb debugging is enabled on your Android 5.0 or later device, you may then
32+
use the following command from your workspace root to install the APK once
33+
built:
34+
'''
35+
adb install -r -g bazel-bin/tensorflow/examples/android/tensorflow_demo_incremental.apk
36+
'''
37+
38+
Alternatively, a streamlined means of building, installing and running in one
39+
command is:
3440
```
35-
bazel mobile-install //tensorflow/examples/android:tensorflow_demo -c opt --copt=-mfpu=neon
41+
bazel mobile-install //tensorflow/examples/android:tensorflow_demo -c opt --start_app --copt=-mfpu=neon
3642
```
3743

38-
Add the "--start_app" flag if you wish to automatically start the app after
39-
installing. Otherwise, find the application icon labeled "Tensorflow Demo".
44+
If camera permission errors are encountered (possible on Android Marshmallow or
45+
above), then the adb install command above should be used instead, as it
46+
automatically grants the required camera permissions with '-g'.

tensorflow/g3doc/api_docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Over time, we hope that the TensorFlow community will develop front ends for
99
languages like Go, Java, Javascript, Lua R, and perhaps others. With SWIG, it's
1010
relatively easy to contribute a TensorFlow interface to your favorite language.
1111

12-
Note: Many practical aspects of ssage are covered in the Mechanics tab, and
12+
Note: Many practical aspects of usage are covered in the Mechanics tab, and
1313
some additional documentation not specific to any particular language API is
1414
available in the Resources tab.
1515

tensorflow/g3doc/api_docs/python/array_ops.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<!-- This file is machine generated: DO NOT EDIT! -->
22

33
# Tensor Transformations
4+
5+
Note: Functions taking `Tensor` arguments can also take anything
6+
accepted by [`tf.convert_to_tensor`](framework.md#convert_to_tensor).
7+
48
<!-- TOC-BEGIN This section is generated by neural network: DO NOT EDIT! -->
59
## Contents
610
* [Casting](#AUTOGENERATED-casting)

0 commit comments

Comments
 (0)