Created
July 4, 2015 12:42
-
-
Save chrisnorthcott/4b35d79a471b19533a42 to your computer and use it in GitHub Desktop.
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
--------------------------------------------------------------------------- | |
ValueError Traceback (most recent call last) | |
<ipython-input-6-d4150d0aed19> in <module>() | |
----> 1 _=deepdream(net, img) | |
<ipython-input-4-975ec2ad7030> in deepdream(net, base_img, iter_n, octave_n, octave_scale, end, clip, **step_params) | |
1 def deepdream(net, base_img, iter_n=10, octave_n=4, octave_scale=1.4, end='inception_4c/output', clip=True, **step_params): | |
2 # prepare base images for all octaves | |
----> 3 octaves = [preprocess(net, base_img)] | |
4 for i in xrange(octave_n-1): | |
5 octaves.append(nd.zoom(octaves[-1], (1, 1.0/octave_scale,1.0/octave_scale), order=1)) | |
<ipython-input-2-9eaacde983ea> in preprocess(net, img) | |
18 print np.float32(np.rollaxis(img, 2)[::-1]) | |
19 print net.transformer.mean['data'] | |
---> 20 return np.float32(np.rollaxis(img, 2)[::-1]) - net.transformer.mean['data'] | |
21 def deprocess(net, img): | |
22 return np.dstack((img + net.transformer.mean['data'])[::-1]) | |
ValueError: operands could not be broadcast together with shapes (4,602,915) (3,1,1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also: