
#
# Session 5, part 3
#

print("Begin import...")


import sys
import os
import numpy as np
import matplotlib.pyplot as plt
from skimage.transform import resize
#from skimage import data # ERROR: Cannot load libmkl_def.so
from scipy.misc import imresize
from scipy.ndimage.filters import gaussian_filter
print("Loading tensorflow...")
import tensorflow as tf
from libs import utils, gif, datasets, dataset_utils, nb_utils


# dja
plt.style.use('bmh')
#import datetime
#np.set_printoptions(threshold=np.inf) # display FULL array (infinite)
plt.ion()
plt.figure(figsize=(4, 4))
import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)
from matplotlib.cbook import MatplotlibDeprecationWarning 
warnings.filterwarnings("ignore", category=MatplotlibDeprecationWarning) 

def wait(n):
    #plt.pause(n)
    plt.pause(3)
    input("(press enter)")


##
## Part 3 - Latent-Space Arithmetic
##


#
# Loading the Pre-Trained Model
#

# We're now going to work with a pre-trained VAEGAN model on the
# Celeb Net dataset. Let's load this model:


tf.reset_default_graph()

print("Import vaegan model...")
from libs import celeb_vaegan as CV
net = CV.get_celeb_vaegan_model()