I have a task for the Deep Learning class, and they provide the Jupyter laptop as the base code, the fact is that after starting the import and changing the data, the jupyter notebook through the "Memory Error", after some analysis, y tried to compile the same code in regular .py file and everything works fine.
The fact is that I should (preferably) use the Jupyter laptop as a basis for development, as it is more interactive for this kind of task.
<ipython-input-2-846f80a40ce2> in <module>()
2
3 cifar10_dir = 'datasets\\'
----> 4 X, y = load_CIFAR10(cifar10_dir)
C:\path\data_utils.pyc in load_CIFAR10(ROOT)
18 f = os.path.join(ROOT, 'cifar10_train.p')
19 print('Path: ' + f );
---> 20 Xtr, Ytr = load_CIFAR_batch(f)
21 return Xtr, Ytr
22
C:\path\data_utils.pyc in load_CIFAR_batch(filename)
10 X = np.array(datadict['data'])
11 Y = np.array(datadict['labels'])
---> 12 X = X.reshape(-1, 3, 32, 32).transpose(0,2,3,1).astype("float")
13 return X, Y
14
MemoryError:
The error is on line 12, I know that this is a memory allocation, but that does not mean that 4 GB of RAM is not enough, and this was confirmed when the code runs without problems outside of Jupyter.
, - Jupyter, Chrome, , .
:
- Windows 10 4 .
- Chrome 57.0.2987.133 (64- )