Hi,
I don’t know why my code is not working:
# (≈ 1 line of code)
# v =
# YOUR CODE STARTS HERE
v=v.reshape(image.shape[0] * image.shape[1] *3, 1)
# YOUR CODE ENDS HERE
return v
I am getting this error:
UnboundLocalError Traceback (most recent call last)
in
12 [ 0.34144279, 0.94630077]]])
13
—> 14 print ("image2vector(image) = " + str(image2vector(t_image)))
15
16 image2vector_test(image2vector)
in image2vector(image)
13 # v =
14 # YOUR CODE STARTS HERE
—> 15 v=v.reshape(image.shape[0] * image.shape[1] *3, 1)
16
17 # YOUR CODE ENDS HERE
UnboundLocalError: local variable ‘v’ referenced before assignment
Can someone please help me?