This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QUnit.module("my-module", | |
{ | |
setup: function () { | |
// Configure Sinon's FakeServer instance. `autoRespond` ensures that any incoming requests | |
// will automatically be replied to, otherwise you *must* invoke `this.server.respond` to | |
// start processing. | |
this.server = sinon.fakeServer.create(); | |
this.server.autoRespond = true; | |
// Tells the FakeServer's XHR request factory that we don't want to respond to every |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mxnet as mx | |
import numpy as np | |
import cPickle | |
import cv2 | |
def extractImagesAndLabels(path, file): | |
f = open(path+file, 'rb') | |
dict = cPickle.load(f) | |
images = dict['data'] | |
images = np.reshape(images, (10000, 3, 32, 32)) |