如下图所示。有人能告诉我为什么长度是4? 我希望长度为3(因为3个数组),但我不知道4的来源是什么?
A, W, b = linear_forward_test_case()
Z, linear_cache = linear_forward(A, W, b)
caches.append(linear_cache)
print("Z = " + str(Z))
print("cache =" + str(linear_cache))
print("Length of caches list = " + str(len(caches)))
结果
Z = [[ 3.26295337 -1.23429987]]
cache =(array([[ 1.62434536, -0.61175641],
[-0.52817175, -1.07296862],
[ 0.86540763, -2.3015387 ]]), array([[ 1.74481176, -0.7612069 , 0.3190391 ]]), array([[-0.24937038]]))
Length of caches list = 4