You can play with no GPU. Van Gogh painting: Ubuntu TensorFlow CPU Edition

Source: Internet
Author: User
Tags gtx

you can play with no GPU. Van Gogh painting: Ubuntu TensorFlow CPU Edition


July Online Development/marketing team Xiao Zhe, Li Wei, July
Date: September 27, 2016



First, preface

September 22, our development/marketing team of two colleagues using DL study Van Gogh painting, Installation Cuda 8.0 times countless pits, many friends seek refuge from the pit. Therefore, 3 days later, September 25, the tutorial will teach you from start to finish using DL study Van Gogh painting: GTX 1070 Cuda 8.0 tensorflow GPU version released. But it's embarrassing that many students don't have a GTX 1070, or even a decent GPU.

For friends in Beijing, we can provide 1070 of machines for free to experiment, but for more friends who are not in Beijing? In order for everyone to have a play, we hereby release the CPU version of this tensorflow painting tutorial. You'll see that building content is a lot simpler compared to GPU versions, but the downside is that there's no GPU, and the computational process is very tough, i7-6700 about 1.5h (you know, after the GPU is done, the final calculation process is a matter of minutes).

But anyway, before you said no GTX 1070 so did not go, and now there is a CPU can run, not limited by the hardware conditions, why not try it now? I hope more friends will play more interesting and fun experiments with us.



Second, installation2.1, Installation TensorFlow

Open Browser under Windows , type:https://github.com/tensorflow/tensorflow

Download Linux Cpu-only:python2 For example, the back Steps 3.1 This file will be used


2.2 Installing Neural-style

Then enter in the Address bar:https://github.com/anishathalye/neural-style

2.3 Installing Vgg19

Then enter in the Address bar:http://www.vlfeat.org/matconvnet/models/beta16/imagenet-vgg-verydeep-19.mat

a download dialog box pops up and downloads directly.

The downloaded file is placed in the root directory of the neural-style folder just below the line , that is, I downloaded the copy good file .


PS: Remember to put all of the above folders on your own U- disk for use under Ubuntu .

2.4, Installation Ubuntu14.04

installed Ubuntu16.04, the CPU is not required for Ubuntu versions.

Download Ubuntu14.04:http://www.ubuntu.com/download/alternative-downloads(select 64-bit download)

UltraISO Soft Disc pass:

http://cn.ultraiso.net/xiazai.html()

Next, install directly: http://jingyan.baidu.com/article/eb9f7b6d8536a8869364e813.html

If you encounter problems, see the GPU version for instructions on installing Ubuntu. ^__^



Third, the experiment 3.1 preparatory work

Open the Ubuntu Command window , type:sudo–i

(Your password)

Apt-get Update( update all sources)

sudo apt-get install python-pip python-dev python-scipy git

(Above command is Download Some necessary libraries for TensorFlow )

After you enter the above command, insert The U-disk that just saved the download file, and then copy the file to the Download directory (the other catalogs are also available, familiar Linux students do it by themselves ok! )

Then enter:cd/home/*** (your user name )/download/ Enter

Input: Pip install TENSORFLOW-0.10.0-CP27-NONE-LINUX_X86_64.WHL// This file is downloaded in 2.1 step

3.2 Starting the experiment

after successful input : CD Neural-style-neural-style-master into the Neural folder directory

Input :python neural_style.py--content ./examples/1-content.jpg --styles ./examples/ 1-style.jpg --output ./examples/julyedu.jpg Enter

And then wait.

Waiting for the class to finish
Waiting for school.
Waiting for the game of childhood

...


just wait (you'll see what we said before: The process of waiting is like having a baby), the calculation process can take two hours, possibly longer (look at CPU configuration and picture size).

But until the child is born, you will be doubly fond of it.



PostScript

Nothing else to say is that we will do more experiments and will take you to more experiments in the September ml algorithm class.
July Online Development/marketing team Xiao Zhe, Li Wei, July, September 27, 2016.

You can play with no GPU. Van Gogh painting: Ubuntu TensorFlow CPU Edition

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.