Git Product home page Git Product logo

Comments (16)

titu1994 avatar titu1994 commented on June 27, 2024

If you're in Windows, its easier to use the Script Helper program. It's in the releases tab, or in the script_helper folder if you downloaded the entire repo.

It ensures correct syntax in executing the script and makes it much easier to perform style transfers.

from neural-style-transfer.

titu1994 avatar titu1994 commented on June 27, 2024

As to the error, its caused by "D:/test". You have to provide a prefix of the image:

So if D:/test is your test image directory, you need to provide the final path as "D:/test/temp1_"

from neural-style-transfer.

beckw avatar beckw commented on June 27, 2024

I would like to use the Script Helper, and have tried it. it also doesn't work to me. I saw the command window start to using Theano and load model then the window disappeared. but i got a screen shot when it's going off.
capture02
capture3
did i make a mistake while setup Environment?

from neural-style-transfer.

titu1994 avatar titu1994 commented on June 27, 2024

@beckw Try doing this : pip install --upgrade git+https://github.com/Theano/Theano.git

That will install and upgrade theano from github to the latest version. Also, your error from before is fixed. This is a new error caused by either an old theano version or using Theano with CPU mode without BLAS libraries.

Edit:
If such an error occurs, it is simpler to use the "Copy Arguments to Clipboard" button, which you can then paste into the cmd to see the error. Then you can paste the errors.

Example after copying the command arguments:
python network.py <-- paste here and just execute -->. It will show a long line of many arguments but that is fine.

from neural-style-transfer.

beckw avatar beckw commented on June 27, 2024

@titu1994 I've used the command line to upgraded Theano to 0.90, still get the error:
capture4
FYI,I got some difference between your guide when I was installing cuDNN. I didn't see the sub-folder"cuda" into the CUDA directory after install CUDA7.5. So, when I extract cuDNN into the CUDA directory, it did not overwrite any files.
Is that a problem?
thanks

from neural-style-transfer.

titu1994 avatar titu1994 commented on June 27, 2024

@beckw I should have made the guide a bit clearer on that.

Once you extract the cudnn folder, there should be 3 sub folders inside the cuda folder. Copy those 3 sub folders and paste them in the CUDA 7.5 folder which has many folders.

It should then override the "bin", "lib" and "include" folders if I remember correctly. This activates cuDNN with CUDA

from neural-style-transfer.

beckw avatar beckw commented on June 27, 2024

@titu1994 I actually did that and added system variables
CUDA_PATH = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5
CUDNN_PATH = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5
have no idea why still doesn't work?

from neural-style-transfer.

titu1994 avatar titu1994 commented on June 27, 2024

@beckw Did you write a .theanorc.txt file in your home directory with the given settings? In your earlier screenshot, it seems that Theano is still using your CPU.

When you use theano in GPU mode with cuDNN, it should show the a few startup lines like :

Using Theano backend
Using GPU device 0: GeForce GTX 980M (CNMEM is enabled with initial size: 80% of memory, cuDNN 5103)

You have to follow the final few steps to setup the .theanorc.txt in windows home directory : C:/Users/{Your Name}/

from neural-style-transfer.

beckw avatar beckw commented on June 27, 2024

sorry, my fault! missing the first . when creating the .theanorc.txt
now it start using GPU.
but got another new error : (
capture5

from neural-style-transfer.

titu1994 avatar titu1994 commented on June 27, 2024

@beckw No problem. Do you have more than 1 CUDA installed ? As in CUDA 7.5 and 8 at the same time? This is usually caused then.

If not, then see if you overwrote the cuda files with the cudnn files.

from neural-style-transfer.

beckw avatar beckw commented on June 27, 2024

@titu1994 I only have CUDA7.5 installed. and copied files like below:
The content of \cudnn-7.5-windows7-x64-v5.0-ga\cuda\bin To C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\bin
The content of \cudnn-7.5-windows7-x64-v5.0-ga\cuda\include To C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\include
The content of \cudnn-7.5-windows7-x64-v5.0-ga\cuda\lib\x64 To C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\lib\x64
Also add these two system variable follow your guide
capture06

from neural-style-transfer.

titu1994 avatar titu1994 commented on June 27, 2024

@beckw
I made a mistake in the guide, the CUDNN_PATH must match the CUDA_PATH, since you are overwriting the files in CUDA. So try setting CUDNN_PATH to the CUDA_PATH.

If that still doesnt work, could you try editing the .theanorc.txt file to remove the line saying optimizer_including=cudnn?

This may be he problem. If it does run, make sure to check that when running the program it still gives the end part:

(CNMEM is enabled with initial size: 80% of memory, cuDNN 5103)

from neural-style-transfer.

beckw avatar beckw commented on June 27, 2024

@titu1994 I've noticed that might be a mistake about CUDNN_PATH in the guide, so I already set both them same.
I have also tried to remove the line: optimizer_including=cudnn and add cudnn=1.0 at the bottom in the .theanorc.txt file.
It still saying (CNMeM is enabled with initial size: 80. 0% of memory, cuDNN not available)

from neural-style-transfer.

titu1994 avatar titu1994 commented on June 27, 2024

@beckw Hmm I don't know what's causing this. For some reason Theano is not able to detect cuDNN. The flag optimizer_including=cudnn is to ensure that theano runs only with cudnn enabled, otherwise crash fast. The fact that Theano is saying cudnn not available means that it can't find cudnn inside cuda for some reason.

Btw, use cudnn=0.8 at max. Using 100 % of gpu memory usually crashes theano because it cannot allocate the memory required by Windows to render the screen.

In any case, cuDNN is needed mainly for the INetwork.py script, since it uses every single layer of the VGG 16 or 19 network which is computationally extremely expensive. You can use the Network.py script instead which uses only 5 layers out of the 16 or 19 to run the program, though quality will be reduced.

from neural-style-transfer.

beckw avatar beckw commented on June 27, 2024

@titu1994 It works after reinstall CUDA and cuDNN.
Great thanks all your help!! : )

from neural-style-transfer.

titu1994 avatar titu1994 commented on June 27, 2024

@beckw No problem. Glad it finally worked.

from neural-style-transfer.

Related Issues (20)

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.