Giter Club home page Giter Club logo

pytorch-deep-dream's Introduction

Pytorch - Deep Dream

Minimal PyTorch implementation of Deep Dream.

Examples

$ python3 deep_dream.py --input_image images/supermarket.jpg

$ python3 deep_dream.py --input_image images/dog.jpg

pytorch-deep-dream's People

Contributors

eriklindernoren avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pytorch-deep-dream's Issues

Error when I run python deep_dream.py --input_image images/supermarket.jpg

When I run this: python deep_dream.py --input_image images/supermarket.jpg
I get the following error"
invalid value encountered in true_divide
zoom = (numpy.array(input.shape) - 1) / zoom_div
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/scipy/ndimage/interpolation.py:532: UserWarning: From scipy 0.13.0, the output shape of zoom() is calculated with round() instead of int() - for these inputs the size of the returned array has changed.
"the returned array has changed.", UserWarning)
Dreaming: 10%|โ–ˆ | 1/10 [00:01<00:11, 1.23s/it]
Traceback (most recent call last):
File "deep_dream.py", line 86, in
num_octaves=args.num_octaves,
File "deep_dream.py", line 51, in deep_dream
input_image = octave_base + detail
ValueError: operands could not be broadcast together with shapes (1,3,31,44) (1,3,22,31)

Fix to Use Cuda Tensors

Currently the code fails if using Cuda. Line 24 should read

- image.data += norm_lr * image.grad.data
+ image.data += Tensor([norm_lr]) * image.grad.data

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.