Skip to content

Commit

Permalink
unit test lab 1
Browse files Browse the repository at this point in the history
  • Loading branch information
aamini committed Jan 25, 2020
1 parent 130b318 commit 7090bc3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions mitdeeplearning/lab1.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,10 @@ def test_batch_func_next_step(func, args):
assert (x[:,1:] == y[:,:-1]).all(), "[FAIL] test_batch_func_next_step: x_{t} must equal y_{t-1} for all t"
print("[PASS] test_batch_func_next_step")
return True

def test_custom_dense_layer_output(y):
true_y = np.array([[0.2697859, 0.45750418, 0.66536945]],dtype='float32')
assert tf.shape(y).numpy().tolist() == list(true_y.shape), "[FAIL] output is of incorrect shape. expected {} but got {}".format(true_y.shape, y.numpy().shape)
assert np.array_equal(y.numpy(), true_y), "[FAIL] output is of incorrect value. expected {} but got {}".format(y.numpy(), y.numpy())
print("[PASS] test_custom_dense_layer_output")
return True
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '1.0.0', # Start with a small number and increase it with every change you make
version = '0.1.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 = '[email protected]', # 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/v1.0.0.tar.gz', # I explain this later on
download_url = 'https://github.com/aamini/introtodeeplearning/archive/v0.1.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=[
Expand Down

0 comments on commit 7090bc3

Please sign in to comment.