forked from 626_privacy/tensorflow_privacy
Record one change for Python3
In Python 3, cPickle is replaced by pickle.
This commit is contained in:
parent
9a53e1eb86
commit
5bac796ee6
1 changed files with 2 additions and 0 deletions
|
@ -18,6 +18,7 @@ from __future__ import division
|
|||
from __future__ import print_function
|
||||
|
||||
import cPickle
|
||||
#import pickle #for python 3
|
||||
import gzip
|
||||
import math
|
||||
import numpy as np
|
||||
|
@ -156,6 +157,7 @@ def unpickle_cifar_dic(file):
|
|||
"""
|
||||
fo = open(file, 'rb')
|
||||
dict = cPickle.load(fo)
|
||||
#dict = pickle.load(fo) #for python 3
|
||||
fo.close()
|
||||
return dict['data'], dict['labels']
|
||||
|
||||
|
|
Loading…
Reference in a new issue