diff --git a/mitdeeplearning/util.py b/mitdeeplearning/util.py index 7f9c2b70..bb87343c 100644 --- a/mitdeeplearning/util.py +++ b/mitdeeplearning/util.py @@ -1,5 +1,4 @@ import matplotlib.pyplot as plt -import tensorflow as tf import time import numpy as np @@ -8,6 +7,7 @@ def display_model(model): + import tensorflow as tf tf.keras.utils.plot_model(model, to_file="tmp.png", show_shapes=True) return ipythondisplay.Image("tmp.png") @@ -29,6 +29,7 @@ def plot_sample(x, y, vae, backend='tf'): recon = np.clip(recon, 0, 1) elif backend == 'pt': + import torch y = y.detach().cpu().numpy() face_indices = np.where(y == 1)[0] idx = face_indices[0] if len(face_indices) > 0 else 0 diff --git a/setup.py b/setup.py index 0e7a4974..b87b6dc7 100644 --- a/setup.py +++ b/setup.py @@ -22,13 +22,13 @@ def get_dist(pkgname): setup( name = 'mitdeeplearning', # How you named your package folder (MyLib) packages = ['mitdeeplearning'], # Chose the same as "name" - version = '0.7.2', # Start with a small number and increase it with every change you make + version = '0.7.3', # Start with a small number and increase it with every change you make license='MIT', # Chose a license from here: https://help.github.com/articles/licensing-a-repository description = 'Official software labs for MIT Introduction to Deep Learning (http://introtodeeplearning.com)', # Give a short description about your library author = 'Alexander Amini', # Type in your name author_email = 'introtodeeplearning-staff@mit.edu', # Type in your E-Mail url = 'http://introtodeeplearning.com', # Provide either the link to your github or to your website - download_url = 'https://github.com/aamini/introtodeeplearning/archive/v0.7.2.tar.gz', # I explain this later on + download_url = 'https://github.com/aamini/introtodeeplearning/archive/v0.7.3.tar.gz', # I explain this later on keywords = ['deep learning', 'neural networks', 'tensorflow', 'introduction'], # Keywords that define your package best install_requires=install_deps, classifiers=[