0

When I tried to load CIFAR10.pkl, the code showed as below:

import os
import pickle
import sklearn
from sklearn.model_selection import StratifiedShuffleSplit
import dgl
import torch
import time

name = 'CIFAR10'
data_dir = './data/superpixels/'

# %%
with open(data_dir+'CIFAR10'+'.pkl',"rb") as f:
    f = pickle.load(f)

However, an error occured, which stated that:

with open(data_dir+'CIFAR10'+'.pkl',"rb") as f:
----> 43     f = pickle.load(f)

AttributeError: Can't get attribute 'DGLFormDataset' on <module 'data.superpixels' (namespace)>

I haven't solved the problem yet, I wonder how to fix it

  • perhaps [this](https://stackoverflow.com/questions/27732354/unable-to-load-files-using-pickle-and-multiple-modules) and [that](https://stackoverflow.com/questions/47713175/attributeerror-while-unpickling-cant-get-attribute-location) sound similar to your issue – jsofri Nov 15 '21 at 13:52

0 Answers0