TensorFlow1.5 on Win10+WSL1+Ubuntu16.04 (w/o AVX)

$ sudo apt install python-pip

$ pip install tensorflow==1.5 numpy==1.16.6 setuptools==44.0 markdown==3.1.1  \

grpcio==1.29 mock==3.0.5 --user 

$ python
Python 2.7.12 (default, Jul 21 2020, 15:19:50)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
>>> sess.run(hello)
'Hello, TensorFlow!'
>>> a = tf.constant(10)
>>> b = tf.constant(32)
>>> print sess.run(a+b)
42
>>>

Python2.7で使えるのはnumpy==1.16.6, setuptools==44.0, markdown==3.1.1, grpcio==1.29, mock==3.0.5まで。 

$ python
Python 2.7.12 (default, Jul 21 2020, 15:19:50)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from __future__ import absolute_import, division, print_function, unicode_literals
>>> import tensorflow as tf
>>> mnist = tf.keras.datasets.mnist
>>>
>>> (x_train, y_train), (x_test, y_test) = mnist.load_data()
Downloading data from https://s3.amazonaws.com/img-datasets/mnist.npz
11493376/11490434 [==============================]11493376/11490434 [==============================] - 2s 0us/step

11501568/11490434 [==============================]11501568/11490434 [==============================] - 2s 0us/step

>>> x_train, x_test = x_train / 255.0, x_test / 255.0
>>> model = tf.keras.models.Sequential([
tf.keras.layers.Flatten(input_shape=(28, 28)),
tf.keras.layers.Dense(128, activation='relu'),
tf.keras.layers.Dropout(0.2),
tf.keras.layers.Dense(10, activation='softmax')
])
>>>
>>> model.compile(optimizer='adam',
loss='sparse_categorical_crossentropy',
metrics=['accuracy'])
WARNING:tensorflow:From /home/XXX.local/lib/python2.7/site-packages/tensorflow/python/keras/_impl/keras/backend.py:1557: calling reduce_mean (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version.
Instructions for updating:
keep_dims is deprecated, use keepdims instead
WARNING:tensorflow:From /home/XXX/.local/lib/python2.7/site-packages/tensorflow/python/keras/_impl/keras/backend.py:1422: calling reduce_max (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version.
Instructions for updating:
keep_dims is deprecated, use keepdims instead
>>> model.fit(x_train, y_train, epochs=5)
Epoch 1/5
60000/60000 [==============================]60000/60000 [==============================] - 14s 227us/step - loss: 0.2923 - acc: 0.9140

Epoch 2/5
60000/60000 [==============================]60000/60000 [==============================] - 12s 196us/step - loss: 0.1405 - acc: 0.9577

Epoch 3/5
60000/60000 [==============================]60000/60000 [==============================] - 10s 159us/step - loss: 0.1070 - acc: 0.9680

Epoch 4/5
60000/60000 [==============================]60000/60000 [==============================] - 9s 156us/step - loss: 0.0891 - acc: 0.9726

Epoch 5/5
60000/60000 [==============================]60000/60000 [==============================] - 9s 155us/step - loss: 0.0735 - acc: 0.9768

<tensorflow.python.keras._impl.keras.callbacks.History object at 0x7fcbca20b310>
>>>
>>> model.evaluate(x_test, y_test, verbose=2)
[0.07539256021127803, 0.9784]
>>>