Errors in w4_unittest.test_gradient_descent(gradient_descent, data, word2Ind, N=10, V=len(word2Ind), num_iters=15):
Only 8 test pass, 8 test failed. Need help to pass the assignment.
Lab ID: xxtobkwetgbb
name default_check
iters: 10 cost: 9.871898
Wrong output values for W1 matrix.
Expected: [[0.36626085 0.39174824 0.12117024 … 0.21485491 0.8417732 0.4013149 ]
[0.13366151 0.55292431 0.39651013 … 0.64203069 0.6203919 0.97065011]
[0.04583524 0.3844958 0.41687347 … 0.18933943 0.40646899 0.71397686]
…
[0.21558747 0.19802266 0.18807501 … 0.39604187 0.78038406 0.6061392 ]
[0.46874053 0.14225732 0.21027327 … 0.87435329 0.75839127 0.97442377]
[0.14330685 0.24524311 0.05433805 … 0.71296115 0.93679829 0.72879085]]
Got: [[0.36076713 0.39112709 0.12117024 … 0.21479838 0.84176972 0.40131263]
[0.12911121 0.55249921 0.39651013 … 0.64201153 0.62037956 0.97063733]
[0.03984304 0.38385189 0.41687347 … 0.18929144 0.40645677 0.71396437]
…
[0.21157952 0.19762766 0.18807501 … 0.39601433 0.78037825 0.60613828]
[0.46320766 0.14177181 0.21027327 … 0.87432881 0.75837938 0.97441797]
[0.13822627 0.24500888 0.05433805 … 0.71284605 0.93677499 0.72878059]].
Wrong output values for W2 matrix.
Expected: [[1.04046605 0.25747557 0.8442884 … 0.74781483 0.94204158 0.13753832]
[0.92697007 0.60855487 0.03547249 … 1.00448112 0.84524621 0.11347339]
[0.74307455 0.69342317 0.77138006 … 0.46450648 0.1669951 0.19468568]
…
[0.61920355 0.52215761 0.44623816 … 0.9124304 0.84898949 0.93984738]
[0.46574136 0.2758288 0.85771942 … 0.55741084 0.76747265 0.59149011]
[0.88165169 0.52037384 0.49309623 … 0.17477053 0.81720993 0.49459066]]
Got: [[1.03501786 0.25144921 0.83697121 … 0.73954613 0.93686106 0.13317436]
[0.92648844 0.60808762 0.03487595 … 1.00399691 0.84490548 0.11323486]
[0.74307464 0.69342266 0.77138085 … 0.46450542 0.16699597 0.19468786]
…
[0.61936098 0.52236763 0.44648672 … 0.91279436 0.84914238 0.94002844]
[0.46578297 0.27586524 0.85777234 … 0.55747884 0.76750961 0.59152292]
[0.88170021 0.52041217 0.49315695 … 0.17483939 0.81723507 0.494629 ]].
Wrong output values for b1 vector.
Expected: [[0.32014249]
[0.35645542]
[0.66014064]
[0.49999915]
[0.32007243]
[0.53686925]
[0.06243521]
[0.79455312]
[0.22314627]
[0.1830438 ]]
Got: [[0.25695238]
[0.31944261]
[0.6052848 ]
[0.46558571]
[0.28084128]
[0.4768072 ]
[0.01469062]
[0.75322691]
[0.16097253]
[0.13913995]].
Wrong output values for gradient of b2 vector.
Expected: [[0.84836055]
[0.02237438]
[0.77574932]
…
[0.26083524]
[0.67111092]
[0.83251139]]
Got: [[0.84257431]
[0.02196416]
[0.77574738]
…
[0.26107524]
[0.67117102]
[0.83256907]].
name small_check
iters: 10 cost: 9.800888
Wrong output values for W1 matrix.
Expected: [[0.22068653 0.87066114 0.20671916 … 0.07752703 0.77457191 0.67174422]
[0.27686996 0.53327416 0.30534023 … 0.38542138 0.28671259 0.13483498]
[0.98726487 0.47048921 0.28648156 … 0.82068062 0.03792429 0.60534254]
[0.34354245 0.59123212 0.27437007 … 0.24936368 0.37304776 0.02650941]
[0.86174104 0.86493979 0.9106285 … 0.30001324 0.2322273 0.7837576 ]]
Got: [[0.21902854 0.87047422 0.20671916 … 0.07749756 0.77457001 0.67173962]
[0.27593546 0.53324417 0.30534023 … 0.38541396 0.28670977 0.13483251]
[0.98591521 0.47024683 0.28648156 … 0.82065668 0.03792289 0.60533686]
[0.3418616 0.5909726 0.27437007 … 0.24935675 0.37304619 0.0265046 ]
[0.86012492 0.86474349 0.9106285 … 0.2999896 0.23222509 0.7837522 ]].
Wrong output values for W2 matrix.
Expected: [[0.76063734 0.54313448 0.93201825 0.73366475 1.01369378]
[0.10534375 0.98155185 0.91759263 0.04255703 0.81151727]
[0.10183758 0.04003434 0.99304265 0.705753 0.2790016 ]
…
[0.44895827 0.68072976 0.2514695 0.82968804 0.91787736]
[0.02947714 0.82556933 0.36649497 0.49664348 0.41883395]
[0.64371746 0.51447658 0.43217088 0.32061725 0.31237781]]
Got: [[0.75918372 0.54065482 0.93021483 0.73264045 1.0116482 ]
[0.10522345 0.98135803 0.91735797 0.04248513 0.8113215 ]
[0.10183752 0.04003445 0.99304289 0.70575305 0.27900188]
…
[0.44900966 0.68083058 0.25155896 0.82973838 0.91794654]
[0.02948876 0.82559394 0.36650902 0.49665118 0.41884847]
[0.64373423 0.51449822 0.43218905 0.32062446 0.31239171]].
Wrong output values for b1 vector.
Expected: [[0.26580585]
[0.67305552]
[0.29752016]
[0.0331565 ]
[0.30445965]]
Got: [[0.25084054]
[0.66347056]
[0.28044523]
[0.01810922]
[0.28369467]].
Wrong output values for gradient of b2 vector.
Expected: [[0.18132807]
[0.44608709]
[0.61834329]
…
[0.75839523]
[0.60204216]
[0.90920856]]
Got: [[0.17939524]
[0.44595095]
[0.61834331]
…
[0.75847348]
[0.60206166]
[0.90922788]].
8 Tests passed
8 Tests failed