This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
import timeit | |
# See https://www.tensorflow.org/tutorials/using_gpu#allowing_gpu_memory_growth | |
config = tf.ConfigProto() | |
config.gpu_options.allow_growth = True | |
with tf.device('/cpu:0'): | |
random_image_cpu = tf.random_normal((100, 100, 100, 3)) | |
net_cpu = tf.layers.conv2d(random_image_cpu, 32, 7) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function, division | |
import tensorflow as tf | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.gridspec as gridspec | |
get_ipython().run_line_magic('matplotlib', 'inline') | |
plt.rcParams['figure.figsize'] = (10.0, 8.0) | |
plt.rcParams['image.interpolation'] = 'nearest' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import scipy.io | |
import scipy.misc | |
import matplotlib.pyplot as plt | |
from matplotlib.pyplot import imshow | |
from PIL import Image | |
from nst_utils import * | |
import numpy as np |