From 5bac796ee684023f852b1ba3b7a460d356cdfc66 Mon Sep 17 00:00:00 2001 From: an1006634493 <35823777+an1006634493@users.noreply.github.com> Date: Mon, 18 Mar 2019 22:09:46 +0800 Subject: [PATCH] Record one change for Python3 In Python 3, cPickle is replaced by pickle. --- research/pate_2017/input.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/research/pate_2017/input.py b/research/pate_2017/input.py index 0a1d89f..c2d669e 100644 --- a/research/pate_2017/input.py +++ b/research/pate_2017/input.py @@ -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']