You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the solution notebook for section 1.3 returns an AssertionError (pasted below)
I'm running macOS 11.5.1 on the M1 chip, using tensorflow-macos 2.5.0
Have anyone got this working on the M1 chip?
[[0.55266035 0.85308117 0.09644735]]
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
/var/folders/_q/0sn2mknj461fsdfsz8xvkhpm0000gn/T/ipykernel_88430/4197002161.py in <module>
37 # test the output!
38 print(y.numpy())
---> 39 mdl.lab1.test_custom_dense_layer_output(y)
~/miniforge3/lib/python3.9/site-packages/mitdeeplearning/lab1.py in test_custom_dense_layer_output(y)
83 true_y = np.array([[0.2697859, 0.45750418, 0.66536945]],dtype='float32')
84 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)
---> 85 np.testing.assert_almost_equal(y.numpy(), true_y, decimal=7, err_msg="[FAIL] output is of incorrect value. expected {} but got {}".format(y.numpy(), true_y), verbose=True)
86 print("[PASS] test_custom_dense_layer_output")
87 return True
[... skipping hidden 2 frame]
~/miniforge3/lib/python3.9/site-packages/numpy/testing/_private/utils.py in assert_array_compare(comparison, x, y, err_msg, verbose, header, precision, equal_nan, equal_inf)
842 verbose=verbose, header=header,
843 names=('x', 'y'), precision=precision)
--> 844 raise AssertionError(msg)
845 except ValueError:
846 import traceback
AssertionError:
Arrays are not almost equal to 7 decimals
[FAIL] output is of incorrect value. expected [[0.55266035 0.85308117 0.09644735]] but got [[0.2697859 0.45750418 0.66536945]]
Mismatched elements: 3 / 3 (100%)
Max absolute difference: 0.5689221
Max relative difference: 1.0485145
x: array([[0.5526603, 0.8530812, 0.0964473]], dtype=float32)
y: array([[0.2697859, 0.4575042, 0.6653695]], dtype=float32)
If this is MIT lab, I had the same problem because was referencing b from the context instead of self.b , but please keep this post for future generations
I am using the same machine, also referring self.b and getting the same error. Is there any way to rectify this issue?
See another issue #116
If you re running locally then get the pull request suggested and install local version of mitdeeplearning library with pip3 install . from the suggested PR
Running the solution notebook for section 1.3 returns an AssertionError (pasted below)
I'm running macOS 11.5.1 on the M1 chip, using tensorflow-macos 2.5.0
Have anyone got this working on the M1 chip?
Python packages installed:
The text was updated successfully, but these errors were encountered: