Login | Register 
FEATURES
APPLICATIONS
DOWNLOADS
EDUCATION
BLOG
WIKI
FORUM
STORE

import tensorflow crashing TD

General discussion about anything TouchDesigner

import tensorflow crashing TD

Postby puck » Wed Aug 08, 2018 2:02 am

Hi out there!

I'm wondering if anyone is having any luck implementing this tensorflow style transfer
from github?

https://github.com/exsstas/StyleTransfer-in-TD

I have successfully installed all the CUDA and python modules and can import the tensorflow module using the python shell ... but when i try to import the tensorflow module into TD crashes instantly with no crash report ...

any thoughts on some things i can to to debug this would be much appreciated?!

thanks

details:

python 3.5.4
HP 440
Quadro m5000
TD 2018.25000
puck
 
Posts: 40
Joined: Thu Jun 28, 2012 1:52 am

Re: import tensorflow crashing TD

Postby alex.arpentin » Wed Aug 08, 2018 12:03 pm

try with CUDA 8.


i was able to import tensorflow in TD, but something still broken. when i'm hitting a Run Style Transfer this error is appearing. can someone help with this? is it tensorflow version error? mine is 1.9 with CUDA 8

Code: Select all
python >>>
Traceback (most recent call last):
  File "C:/Python35/Lib/site-packages\tensorflow\python\framework\op_def_library.py", line 510, in _apply_op_helper
    preferred_dtype=default_dtype)
  File "C:/Python35/Lib/site-packages\tensorflow\python\framework\ops.py", line 1107, in internal_convert_to_tensor
    ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
  File "C:/Python35/Lib/site-packages\tensorflow\python\framework\ops.py", line 944, in _TensorTensorConversionFunction
    (dtype.name, t.dtype.name, str(t)))
ValueError: Tensor conversion requested dtype float32 for Tensor with dtype string: 'Tensor("Const_14:0", shape=(), dtype=string, device=/device:GPU:0)'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/StyleTransfer/UI/chopexec1", line 3, in onOffToOn
  File "/StyleTransfer/local/modules/main", line 582, in render_single_image
  File "/StyleTransfer/local/modules/main", line 379, in stylize
  File "/StyleTransfer/local/modules/main", line 175, in build_model
  File "/StyleTransfer/local/modules/main", line 202, in conv_layer
  File "C:/Python35/Lib/site-packages\tensorflow\python\ops\gen_nn_ops.py", line 1042, in conv2d
    data_format=data_format, dilations=dilations, name=name)
  File "C:/Python35/Lib/site-packages\tensorflow\python\framework\op_def_library.py", line 546, in _apply_op_helper
    inferred_from[input_arg.type_attr]))
TypeError: Input 'filter' of 'Conv2D' Op has type string that does not match type float32 of argument 'input'.
python >>>
User avatar
alex.arpentin
 
Posts: 49
Joined: Tue Jan 14, 2014 6:45 am
Location: Eastern Europe, Republic of Moldova

Re: import tensorflow crashing TD

Postby alex.arpentin » Wed Aug 08, 2018 2:52 pm

Error is resolved, I downloaded the wrong VGG-VD model. But now td is freezed for a looong time,that's because i'm used CPU version. the difference between CPU and GPU is significant - 2 hours with 1280X720 input image on the CPU and about 4 minutes with 640X480 input image on GPU (GTX 970 6gb )

so if anyone will face the same issue, this topic was helpful
viewtopic.php?f=12&t=12380

I've downloaded CUDA 8 + cuDNN v5.1 for CUDA 8.0 (you can find achieved versions here https://developer.nvidia.com/rdp/cudnn-archive)

also you should have python 3.5 and tensorflow v1.0 (because , as i understood latest tensorflow 1.9 version is running with CUDA 9, which resulting TD to crash)

when importing tensorflow, you may see errors like these: cudart64_XX.dll is missing or something like this, ‘XX’ is a version number. mine for example is cudart64_80. this means you need version 8.0 of the CUDA drivers.

When you have the right CUDA drivers, but the wrong or missing CuDNN drivers, you’ll see an error saying something like cudnn64_X.dll is missing. mine is cudnn64_5, so i know that i need CuDNN v5

you can avoid CuDNN instalation if you are using CPU version, but it is really slooow.
hope that helps. cheers!
User avatar
alex.arpentin
 
Posts: 49
Joined: Tue Jan 14, 2014 6:45 am
Location: Eastern Europe, Republic of Moldova


Return to General TouchDesigner Discussion

Who is online

Users browsing this forum: No registered users and 13 guests