lisa-lab/pylearn2

Make autoencoder.py more Windows compatible

Opened this issue · 1 comments

See: https://groups.google.com/forum/#!searchin/pylearn-users/example3_weights/pylearn-users/RVpBfdfYJFg/blpTqYYTEAAJ

I figured out the problem and I wonder if this is a bug. In autoencoder.py, the following code (at line 33):

def save(self, fname):
    fp = open(fname, 'w')
    pickle.dump([self.W, self.bias_vis, self.bias_hid], fp)
    fp.close()

should be:

def save(self, fname):
    fp = open(fname, 'wb')
    pickle.dump([self.W, self.bias_vis, self.bias_hid], fp)
    fp.close()
nouiz commented

That is a good food. If you make a pr we will merge it.

Fred
Le 29 oct. 2015 17:27, "isaacgerg" notifications@github.com a écrit :

See:
https://groups.google.com/forum/#!searchin/pylearn-users/example3_weights/pylearn-users/RVpBfdfYJFg/blpTqYYTEAAJ

I figured out the problem and I wonder if this is a bug. In
autoencoder.py, the following code (at line 33):

def save(self, fname):
fp = open(fname, 'w')
pickle.dump([self.W, self.bias_vis, self.bias_hid], fp)
fp.close()

should be:

def save(self, fname):
fp = open(fname, 'wb')
pickle.dump([self.W, self.bias_vis, self.bias_hid], fp)
fp.close()


Reply to this email directly or view it on GitHub
#1561.