Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notebook stuck in loading data set #4434

Open
pehades opened this issue Feb 28, 2019 · 0 comments
Open

Notebook stuck in loading data set #4434

pehades opened this issue Feb 28, 2019 · 0 comments

Comments

@pehades
Copy link

pehades commented Feb 28, 2019

Hi, I am having the following problem. I want to work with the CIFAR10 - data set (more specifically, I follow this course individually and I am trying to do the first assignment http://cs231n.github.io/assignments2018/assignment1/ ).

When I first open the code for linear_svm, the data set loads and everything is ok. But if I shut it down and open it some other time and try to run each sell again, then it gets stuck when I try to load again the data set. I have started learning python the last months, so I don't know what goes wrong.

The code for the first cell is:

# Run some setup code for this notebook.
from __future__ import print_function
import random
import numpy as np
from cs231n.data_utils import load_CIFAR10
import matplotlib.pyplot as plt



# This is a bit of magic to make matplotlib figures appear inline in the
# notebook rather than in a new window.
%matplotlib inline
plt.rcParams['figure.figsize'] = (10.0, 8.0) # set default size of plots
plt.rcParams['image.interpolation'] = 'nearest'
plt.rcParams['image.cmap'] = 'gray'

# Some more magic so that the notebook will reload external python modules;
# see http://stackoverflow.com/questions/1907993/autoreload-of-modules-in-ipython
%load_ext autoreload
%autoreload 2

Then the second cell is

# Load the raw CIFAR-10 data.
cifar10_dir = 'cs231n/datasets/cifar-10-batches-py'

# Cleaning up variables to prevent loading data multiple times (which may cause memory issue)


X_train, y_train, X_test, y_test = load_CIFAR10(cifar10_dir)

# As a sanity check, we print out the size of the training and test data.
print('Training data shape: ', X_train.shape)
print('Training labels shape: ', y_train.shape)
print('Test data shape: ', X_test.shape)
print('Test labels shape: ', y_test.shape)

Note: The command "from future import print_function" in the original notebook was after all the import commands. But when I runned this cell, it told me that it should be in the beginning of the file.

I would appreciate any help! I am a beginner in python and machine learning alone and currently I am highly stuck! Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant