21 September 2017
pip install tensorflow
# or
pip install tensorflow-gpu
virtualenv -p python3 --system-site-packages ./env3-tensorflow
. env3-tensorflow/bin/activate
# CLI-prompt changes
pip install --upgrade pip
pip install tensorflow
# or
pip install tensorflow-gpu
pip
releasebazel
Python virtualenv
tensorflow
from GitHub./configure
build optionsbazel build
the code.whl
filepip
bazel
?blaze
(Google's build environment)BUILD
filesbazel
wget https://github.com/bazelbuild/bazel/releases/ \
download/0.5.4/bazel-0.5.4-installer-linux-x86_64.sh
# This downloads 185Mb ...
chmod +x bazel-0.5.4-installer-linux-x86_64.sh
# This will install it to ~/bin/ which is Ok, since
# ```which missing-binary``` shows is in that path
./bazel-0.5.4-installer-linux-x86_64.sh --user
# Seems to unpack stuff..
bazel version
#Build label: 0.5.4
virtualenv
virtualenv-3.6 --system-site-packages env3-tensorflow
. ./env3-tensorflow/bin/activate
tensorflow
git clone https://github.com/tensorflow/tensorflow # Downloads ~120Mb
# This downloads 120Mb ...
cd tensorflow
./configure
./configure
You have bazel 0.5.4 installed.
Please specify the location of python.
[Default is / ... /env3-tensorflow/bin/python]:
...
Do you wish to build TensorFlow with Hadoop File System support? [y/N]:
No Hadoop File System support will be enabled for TensorFlow.
...
Do you wish to build TensorFlow with XLA JIT support? [y/N]: Y
XLA JIT support will be enabled for TensorFlow.
...
bazel
bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package
# Lots of downloads...
# including protobuf, llvm, ...
# INFO: Elapsed time: 5218.471s, Critical Path: 86.01s
--config=cuda
for GPU code (cross-fingers)--copt=-O
for compilation of boringssl
(?!?)git pull
s in last 2 weekspython .whl
bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
pip install /tmp/tensorflow_pkg/tensorflow-*.whl
cd SOMEWHERE-ELSE
python
import tensorflow as tf
a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a')
b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b')
c = tf.matmul(a, b)
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
print(sess.run(c))
# in tensorflow.python.eager.context (at end) :
# TODO(apassos): This should not be a part of the public API.
from tensorflow.python.util.all_util import remove_undocumented
remove_undocumented(__name__)
Adding to tensorflow/python/util/all_util.py
lets us see :
#print("Deleting : ", extra_symbol, " from ", fully_qualified_name)
print("Deleting : ", fully_qualified_name)
Deleting : tensorflow.contrib.stateless.remove_undocumented
Deleting : tensorflow.contrib.stat_summarizer.remove_undocumented
Deleting : tensorflow.contrib.decision_trees.remove_undocumented
Deleting : tensorflow.contrib.timeseries.remove_undocumented
Deleting : tensorflow.contrib.seq2seq.remove_undocumented
Deleting : tensorflow.contrib.sparsemax.remove_undocumented
Deleting : tensorflow.contrib.tpu.remove_undocumented
Deleting : tensorflow.contrib.tfprof.remove_undocumented
https://einstein.ai/research/
learned-in-translation-contextualized-word-vectors/
= blog, paper, code & models
http://www.cs.nott.ac.uk/~psxasj/3dme/
= demo, video, paper & code
https://www.reddit.com/r/MachineLearning/comments/
6z51xb/we_are_the_google_brain_team_wed_love_to_answer/
My blog : http://blog.mdda.net/
GitHub : mdda