And the error:
AttributeError: 'tuple' object has no attribute 'shape'
The problem occurs when I try visualize_dictionary, but changing line 4 to:
dl.visualize_dictionary(dictionary_b[0], 16, 16)
solves this problem. The code looks fine but the tutorial is a bit misleading - since dictionary_a is not the same as dictionary_b (dictionary_b is a tuple).
I am having trouble with
dl.ksvd
, using the tutorial code below (trying to train on my own image - 'image_rescaled'). Here is my code:And the error:
AttributeError: 'tuple' object has no attribute 'shape'
The problem occurs when I try
visualize_dictionary
, but changing line 4 to:dl.visualize_dictionary(dictionary_b[0], 16, 16)
solves this problem. The code looks fine but the tutorial is a bit misleading - since dictionary_a is not the same as dictionary_b (dictionary_b is a tuple).