chiphuyen / stanford-tensorflow-tutorials

This repository contains code examples for the Stanford's course: TensorFlow for Deep Learning Research.
http://cs20.stanford.edu
MIT License
10.33k stars 4.32k forks source link

memory error struct.unpack() #90

Closed phyorch closed 6 years ago

phyorch commented 6 years ago

when I was using utils model there was a mistake happened at struct.unpack() train, val, test = tools.read_mnist(Data_Dir, flatten=True) MemoryError

chiphuyen commented 6 years ago

Can you be more specific with the code you used and the error message/stack trace?

phyorch commented 6 years ago

@chiphuyen I've sovled the problem, thanks~

xlk369293141 commented 5 years ago

Hello, how did you solve the problem? I think our problem is same. struct.unpack() return a too large number for "num" variable

File "D:/GitHub/stanford-tensorflow-tutorials/examples/03_logreg_starter.py", line 28, in train, val, test = utils.read_mnist(mnist_folder, flatten=True)

File "D:\GitHub\stanford-tensorflow-tutorials\examples\utils.py", line 113, in read_mnist imgs, labels = parse_data(path, 'train', flatten)

File "D:\GitHub\stanford-tensorflow-tutorials\examples\utils.py", line 94, in parse_data new_labels = np.zeros((num, 10)) MemoryError