Comments (16)
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.
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.
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.
did i make a mistake while setup Environment?
from neural-style-transfer.
@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.
@titu1994 I've used the command line to upgraded Theano to 0.90, still get the error:
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.
@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.
@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.
@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.
sorry, my fault! missing the first . when creating the .theanorc.txt
now it start using GPU.
but got another new error : (
from neural-style-transfer.
@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.
@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
from neural-style-transfer.
@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.
@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.
@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.
@titu1994 It works after reinstall CUDA and cuDNN.
Great thanks all your help!! : )
from neural-style-transfer.
@beckw No problem. Glad it finally worked.
from neural-style-transfer.
Related Issues (20)
- [Question] Content mask format HOT 5
- how to run the script on multiples GPU?
- ImportError: cannot import name 'imread' HOT 5
- Google colab neural style transfer HOT 2
- error in MRFNetwork.py HOT 1
- could we apply fast-style-transfer to image deformation? HOT 2
- Update documentation to reflect that tensorflow works on Windows now
- Replace tf.gradients with tf.GradientTape : RuntimeError HOT 2
- Bug using preserve color option HOT 3
- ValueError: Tensor conversion requested dtype float32 for Tensor with dtype int32: 'Tensor("strided_slice_8:0", shape=(), dtype=int32)' HOT 1
- script helper
- script helper
- Saving model
- RuntimeError: tf.gradients is not supported when eager execution is enabled. Use tf.GradientTape instead. HOT 5
- convert_all_kernels_in_model removed from tf2 HOT 1
- RuntimeError: tf.gradients is not supported when eager execution is enabled. Use tf.GradientTape instead. HOT 2
- neural doodle
- broken and unusable HOT 1
- Tensorflow 1 is unsupported in Colab
- Hello, I'm sorry to bother you. I need help
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neural-style-transfer.