Login | Register 

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?


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?!



python 3.5.4
HP 440
Quadro m5000
TD 2018.25000
Posts: 46
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
  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
TypeError: Input 'filter' of 'Conv2D' Op has type string that does not match type float32 of argument 'input'.
python >>>
User avatar
Posts: 58
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

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
Posts: 58
Joined: Tue Jan 14, 2014 6:45 am
Location: Eastern Europe, Republic of Moldova

Re: import tensorflow crashing TD

Postby exsstas » Tue Sep 18, 2018 5:57 am

Hi! Author of the script here.
It isn't easy to install everything correctly, because of lack of compartibility. I reinstall everything 3 or 4 times on different PCs and almost everytime I got some new errors, while loading modules. Sometimes googling can help to solve it, sometimes you'll need to try different versions of tensorflow/numpy/CUDA (it's easier in Anaconda).

Anyway, now I got all things working fine together in a such setup:
cuDNN v6 + 7 for CUDA 8.0 (I copied files from 6 and rewrite some of them afterwards with cudnn-8.0-windows10-x64-v7.1)
Python 3.5.1
tensorflow-gpu=1.4.0 (higher versions needs CUDA 9 unsupported by Touch)
TouchDesigner 64-Bit 099 Build 2018.25850
Posts: 37
Joined: Sun Dec 22, 2013 3:48 pm

Return to General TouchDesigner Discussion

Who is online

Users browsing this forum: harveymoon and 12 guests