Testing the installation of TensorFlow -- without GPU


In [1]:
import tensorflow as tf
import pandas as pd
from IPython.display import Image

In [2]:
hello = tf.constant('Testing installation of TensorFlow!')
sess = tf.Session()
sess.run(hello)
a = tf.constant(10)
b = tf.constant(20)
sess.run(a + b)


Out[2]:
30

Detail out the installation instructions


In [9]:
# One can peek into the weights using h5py
from scipy.io import loadmat
file_handle = loadmat('/home/deploy/pramit/MLStrategy/neural_style_painting/imagenet-vgg-verydeep-19.mat')

In [18]:
print(pd.DataFrame(file_handle['layers']).head()[1])


0    [[[[u'relu1_1'], [u'relu'], [[0]], [], [[0]]]]]
Name: 1, dtype: object

Input Image1:


In [42]:
# Output from the default Neural Style Implementation:
Image("/home/deploy/pramit/MLStrategy/neural_style_painting/neural_clone/neural-style-tf/image_output/result/content.png")


Out[42]:

Style Input1:


In [36]:
Image("/home/deploy/pramit/MLStrategy/neural_style_painting/neural_clone/neural-style-tf/image_output/result/style_0.png")


Out[36]:

Output: Combined Style


In [34]:
Image("/home/deploy/pramit/MLStrategy/neural_style_painting/neural_clone/neural-style-tf/image_output/result/result.png")


Out[34]:

Example 3:


In [47]:
Image("/home/deploy/pramit/MLStrategy/neural_style_painting/neural_clone/neural-style-tf/image_output/result/face_mask.png")


Out[47]:

In [48]:
Image("/home/deploy/pramit/MLStrategy/neural_style_painting/neural_clone/neural-style-tf/image_output/result/face_mask_starry_nights.png")


Out[48]:

In [7]:
Image("/home/deploy/pramit/MLStrategy/neural_style_painting/neural_clone/neural-style-tf/image_output/result/datascience_starry_night.png")


Out[7]:

In [6]:
# kandinsky
Image("/home/deploy/pramit/MLStrategy/neural_style_painting/neural_clone/neural-style-tf/styles/kandinsky.jpg")


Out[6]:

In [8]:
Image("/home/deploy/pramit/MLStrategy/neural_style_painting/neural_clone/neural-style-tf/image_output/result/result.png")


Out[8]:

In [9]:
Image("/home/deploy/pramit/MLStrategy/neural_style_painting/neural_clone/neural-style-tf/styles/the_scream.jpg")


Out[9]:

In [10]:
Image("/home/deploy/pramit/MLStrategy/neural_style_painting/neural_clone/neural-style-tf/image_output/result/result.png")


Out[10]:

In [14]:
Image("/home/deploy/pramit/MLStrategy/neural_style_painting/neural_clone/neural-style-tf/image_input/datascience_logo2.png")


Out[14]:

In [12]:
# Starry nights applied to DataScience logo
Image("/home/deploy/pramit/MLStrategy/neural_style_painting/neural_clone/neural-style-tf/image_output/result/result.png")


Out[12]:

In [ ]: