Giter VIP home page Giter VIP logo

deep_dream_challenge's Introduction

deep_dream_challenge

Deep Dream Challenge code by @SIrajology on Youtube

##Overview

This is the code for the Deep Dream challenge for 'Learn Python for Data Science #5' by @Sirajology on YouTube. The code uses the Tensorflow Machine Learning library to generate a trippy image from a given input image.

##Dependencies

Install missing dependencies using pip

##Demo Usage

Once you have your dependencies installed via pip, run the demo script in terminal via

python deep_dream.py

##Challenge

The instructions are

  1. Add a function to the existing deep dream python file that converts not just an image, but a video clip to deep dream.

HINT Think of a video as a collection of images (frames).

If you want to use your own template, that's fine too. Submit your code in the comments section and I'll announce the winner in the next video. Good luck!

##Credits

Thanks Google and Liu I've reformatted this code to make it easier to grok.

deep_dream_challenge's People

Contributors

llsourcell 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

deep_dream_challenge's Issues

The TensorFlow library wasn't compiled to use AVX instructions

2018-03-19 14:44:16.835465: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2018-03-19 14:44:16.835911: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
how do I solve this?

Have you solved your problem?I meet the same question with you.I get an error like: Status(StatusCode=InvalidArgument, Detail="input and filter must have the same depth: 1 vs 3

I get an error like: Status(StatusCode=InvalidArgument, Detail="input and filter must have the same depth: 1 vs 3
[[Node: conv2d_1/convolution = Conv2D[T=DT_FLOAT, data_format="NHWC", dilations=[1, 1, 1, 1], padding="VALID", strides=[1, 2, 2, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_input_1_0_0, conv2d_1/kernel/read)]]")'

Any thoughts on this? for me it is 1 Vs 3

Originally posted by @R-Miner in #5 (comment)

How to resolve?

Traceback (most recent call last):
File "C:/Users//Desktop/deep_dream.py", line 186, in
main()
File "C:/Users//Desktop/deep_dream.py", line 35, in main
graph_def.ParseFromString(f.read())
File "C:\Users\AppData\Local\Continuum\Anaconda3\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 112, in read
return pywrap_tensorflow.ReadFromStream(self._read_buf, length, status)
File "C:\Users\AppData\Local\Continuum\Anaconda3\lib\contextlib.py", line 66, in exit
next(self.gen)
File "C:\Users\AppData\Local\Continuum\Anaconda3\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 469, in raise_exception_on_not_ok_status
pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.OutOfRangeError: reached end of file

input and filter must have the same depth: 4 vs 3

Hi,

I get this error / exception, and while it is being, handled, the same error/exception occurs.
I am fairly new to this so it could be a multitude of problems, from the way I have set up python, tf etc, to improper hardware, but I thought I would put it up here in case someone had an easy fix!

Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 965, in _do_call
return fn(*args)
File "/usr/local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 947, in _run_fn
status, run_metadata)
File "/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/contextlib.py", line 66, in exit
next(self.gen)
File "/usr/local/lib/python3.5/site-packages/tensorflow/python/framework/errors.py", line 450, in raise_exception_on_not_ok_status
pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors.InvalidArgumentError: input and filter must have the same depth: 4 vs 3
[[Node: import/conv2d0_pre_relu/conv = Conv2D[T=DT_FLOAT, data_format="NHWC", padding="SAME", strides=[1, 2, 2, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/cpu:0"](ExpandDims, import/conv2d0_w)]]

'Layer' variable not used

Thanks for the helpful tutorial. I am working with a slightly altered version of this code, pasted into various cells in a Jupyter notebook, I have not tried running the file as is.

I just wanted to point out that I noticed that you have the user set a variable called 'layer' (line 174), but then it is not used for anything. It looks like that layer is actually hard coded in (line 182). Once I changed that, the pictures actually started to come out differently, but this confused me for a while.

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.