When creating a post, please add:
- Week # must be added in the tags option of the post.
- Link to the classroom item you are referring to:
- Description (include relevant info but please do not post solution code or your entire notebook)
Hi, I’ve a problem on the first exercise of the assignement linked below. I got an error :
<tf.Variable ‘W:0’ shape=(4, 3) dtype=float64, numpy=
array([[ 2.2408932 , 1.86755799, -0.97727788],
[ 0.95008842, -0.15135721, -0.10321885],
[ 0.4105985 , 0.14404357, 1.45427351],
[ 0.76103773, 0.12167502, 0.44386323]])>
tf.Tensor(
[[1.76405235]
[0.40015721]
[0.97873798]], shape=(3, 1), dtype=float64)
tf.Tensor(
[[ 0.33367433]
[ 1.49407907]
[-0.20515826]
[ 0.3130677 ]], shape=(4, 1), dtype=float64)
tf.Tensor(
[[4.07754504]
[3.00849389]
[2.00015178]
[2.13869303]], shape=(4, 1), dtype=float64)
tf.Tensor(
[[4.07754504]
[3.00849389]
[2.00015178]
[2.13869303]], shape=(4, 1), dtype=float64)
AssertionError Traceback (most recent call last)
in
3
4 assert type(result) == EagerTensor, “Use the TensorFlow API”
----> 5 assert np.allclose(result, [[-2.15657382], [ 2.95891446], [-1.08926781], [-0.84538042]]), “Error”
6 print(“\033[92mAll test passed”)
AssertionError: Error
The function looks right, and it is very easy to implement. I followed the tips (that is the 99% of the job in this case), but I got an error.
Just to understand if is something due to my code or if is an error on the assignement. Thanks!