Ask Your Question

Revision history [back]

The error lies in the first line of multilayer_perceptron:

for k in len(pc):

Indeed, len(pc) is an integer (the length of pc), so you cannot iterate on it. Maybe you mean

for k in pc:

instead?

The error lies in the first line of multilayer_perceptron:

for k in len(pc):

Indeed, len(pc) is an integer (the length of pc), so you cannot iterate on it. Maybe you mean

for k in pc:

instead?instead or perhaps

for k in range(len(pc)):

(depending on the nature of k and pc).