python : AttributeError: 'str' object has no attribute 'keys'
www.py4u.net › discuss › 181601AttributeError: 'str' object has no attribute 'keys'. This is the main code: def generate_arrays_for_training(indexPat, paths, start=0, end=100): while True: from_=int(len(paths)/100*start) to_=int(len(paths)/100*end) for i in range(from_, int(to_)): f=paths [i] x = np.load (PathSpectogramFolder+f) if('P' in f): y = np.repeat ( [ [0,1]],x.shape [0], axis=0) else: y =np.repeat ( [ [1,0]],x.shape [0], axis=0) yield(x,y) history=model.fit_generator (generate_arrays_for_training (indexPat, ...