Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update lab1.py #155

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mitdeeplearning/lab1.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def test_batch_func_next_step(func, args):

def test_custom_dense_layer_output(y):
# define the ground truth value for the array
true_y = np.array([[0.27064407, 0.1826951, 0.50374055]],dtype='float32')
true_y = np.array([[0.26978594 0.45750412 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)
np.testing.assert_almost_equal(y.numpy(), true_y, decimal=7, err_msg="[FAIL] output is of incorrect value. expected {} but got {}".format(true_y, y.numpy()), verbose=True)
print("[PASS] test_custom_dense_layer_output")
Expand Down