Skip to content

Commit 7090bc3

Browse files
committed
unit test lab 1
1 parent 130b318 commit 7090bc3

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

mitdeeplearning/lab1.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,10 @@ def test_batch_func_next_step(func, args):
7777
assert (x[:,1:] == y[:,:-1]).all(), "[FAIL] test_batch_func_next_step: x_{t} must equal y_{t-1} for all t"
7878
print("[PASS] test_batch_func_next_step")
7979
return True
80+
81+
def test_custom_dense_layer_output(y):
82+
true_y = np.array([[0.2697859, 0.45750418, 0.66536945]],dtype='float32')
83+
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)
84+
assert np.array_equal(y.numpy(), true_y), "[FAIL] output is of incorrect value. expected {} but got {}".format(y.numpy(), y.numpy())
85+
print("[PASS] test_custom_dense_layer_output")
86+
return True

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ def get_dist(pkgname):
2222
setup(
2323
name = 'mitdeeplearning', # How you named your package folder (MyLib)
2424
packages = ['mitdeeplearning'], # Chose the same as "name"
25-
version = '1.0.0', # Start with a small number and increase it with every change you make
25+
version = '0.1.0', # Start with a small number and increase it with every change you make
2626
license='MIT', # Chose a license from here: https://help.github.com/articles/licensing-a-repository
2727
description = 'Official software labs for MIT Introduction to Deep Learning (http://introtodeeplearning.com)', # Give a short description about your library
2828
author = 'Alexander Amini', # Type in your name
2929
author_email = '[email protected]', # Type in your E-Mail
3030
url = 'http://introtodeeplearning.com', # Provide either the link to your github or to your website
31-
download_url = 'https://github.com/aamini/introtodeeplearning/archive/v1.0.0.tar.gz', # I explain this later on
31+
download_url = 'https://github.com/aamini/introtodeeplearning/archive/v0.1.0.tar.gz', # I explain this later on
3232
keywords = ['deep learning', 'neural networks', 'tensorflow', 'introduction'], # Keywords that define your package best
3333
install_requires=install_deps,
3434
classifiers=[

0 commit comments

Comments
 (0)