Skip to content

Lab 1 Defining a network layer - Assertion error #131

Open
@GoviKandula

Description

@GoviKandula

I am using Google Collab.

Getting the following error: Can someone please help me
[[0.36430186 0.8134891 0.15117118]]

AssertionError Traceback (most recent call last)
in <cell line: 38>()
36 # test the output!
37 print(y.numpy())
---> 38 mdl.lab1.test_custom_dense_layer_output(y)

1 frames
[... skipping hidden 2 frame]

/usr/local/lib/python3.10/dist-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.36430186 0.8134891 0.15117118]] but got [[0.2697859 0.45750418 0.66536945]]
Mismatched elements: 3 / 3 (100%)
Max absolute difference: 0.5141983
Max relative difference: 0.7781019
x: array([[0.3643019, 0.8134891, 0.1511712]], dtype=float32)
y: array([[0.2697859, 0.4575042, 0.6653695]], dtype=float32)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions