Jun-12-2020, 11:18 AM
(Jun-12-2020, 10:20 AM)DreamingInsanity Wrote: Sorry, my mistake - it should work if you do this:
import glob def open_train_data(): return glob.glob('/home/mojito/Desktop/CNN/datasets/training_data/images/*') #the '*' is a 'wildcard' and it means to match one or more characters for f in open_train_data(): dict1 = pickle.load(open(f, 'rb')) ###do whatever else you need toI forgot to open the file.
I am getting this error:
Using TensorFlow backend. Traceback (most recent call last): File "source_code_modified.py", line 80, in <module> dict1 = pickle.load(open(f, 'rb')) _pickle.UnpicklingError: A load persistent id instruction was encountered, but no persistent_load function was specified.I am trying to solve it though, but I thought posting it for more help. Thank you...