From 319ba40e63ed62e96b94801619d6bf573e62d846 Mon Sep 17 00:00:00 2001 From: Alexander Amini Date: Sun, 8 Jan 2023 13:09:08 -0500 Subject: [PATCH] create_grid and release 3.0 --- mitdeeplearning/util.py | 16 ++++++++++++++++ setup.py | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/mitdeeplearning/util.py b/mitdeeplearning/util.py index d3853dd1..f9c39f34 100644 --- a/mitdeeplearning/util.py +++ b/mitdeeplearning/util.py @@ -74,3 +74,19 @@ def plot(self, data): ipythondisplay.display(plt.gcf()) self.tic = time.time() + + +def create_grid_of_images(xs, size=(5,5)): + """ Combine a list of images into a single image grid by stacking them into an array of shape `size` """ + + grid = [] + counter = 0 + for i in range(size[0]): + row = [] + for j in range(size[1]): + row.append(xs[counter]) + counter += 1 + row = np.hstack(row) + grid.append(row) + grid = np.vstack(grid) + return grid diff --git a/setup.py b/setup.py index 2c27ae2a..90d0df82 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.2.0', # Start with a small number and increase it with every change you make + version = '0.3.0', # 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.2.0.tar.gz', # I explain this later on + download_url = 'https://github.com/aamini/introtodeeplearning/archive/v0.3.0.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=[