csyanbin / TPN

Code for ICLR19 paper: Learning to Propagate Labels: Transductive Propagation Network for Few-shot Learning.
243 stars 43 forks source link

pkl.load() #4

Closed LYF14020510036 closed 5 years ago

LYF14020510036 commented 5 years ago

Traceback (most recent call last): File "test.py", line 122, in loader_test.load_data_pkl() File "/home/x_y/lyf/TPN/dataset_mini.py", line 86, in load_data_pkl data = pkl.load(f) _pickle.UnpicklingError: invalid load key, '*'.

hello,could you help me?

csyanbin commented 5 years ago

First, please check if the pkl file exists and put in the correct folder. Second, I use python3. Maybe this problem is caused by python2?

LYF14020510036 commented 5 years ago

First, please check if the pkl file exists and put in the correct folder. Second, I use python3. Maybe this problem is caused by python2? thank you very much,I check it again,I find only mini-imagenet-cache-test.pkl has a error.

LYF14020510036 commented 5 years ago

Thank you very much,I check it again,I find only mini-imagenet-cache-test.pkl has a error.

csyanbin commented 5 years ago

I think you'd better check if mini-imagenet-cache-test.pkl is corrupted. Eg, you can run the following command in python:


import pickle as pkl
test = pkl.load(open('mini-imagenet-cache-test.pkl', 'rb'))
LYF14020510036 commented 5 years ago

Thank you very much,I've tried your advice and find the same error. I'll download a new data.Thanks again.