MiguelMonteiro / permutohedral_lattice

Permutohedral Lattice C++/CUDA implementation + TensorFlow Op (CPU/GPU)
83 stars 18 forks source link

Get weird error when using Bilateral Filter #7

Closed fsk119 closed 5 years ago

fsk119 commented 5 years ago

Hello, when I doing test on a small demo, I get such error:

2018-10-12 10:54:42.372961: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2
2018-10-12 10:54:42.487787: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Found device 0 with properties:
name: GeForce GTX 1080 major: 6 minor: 1 memoryClockRate(GHz): 1.86
pciBusID: 0000:02:00.0
totalMemory: 7.92GiB freeMemory: 26.00MiB
2018-10-12 10:54:42.487833: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1120] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: GeForce GTX 1080, pci bus id: 0000:02:00.0, compute capability: 6.1)
2018-10-12 10:54:42.489801: E tensorflow/stream_executor/cuda/cuda_driver.cc:936] failed to allocate 26.00M (27262976 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY
2018-10-12 10:54:42.557414: E tensorflow/stream_executor/cuda/cuda_dnn.cc:385] could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR
2018-10-12 10:54:42.557467: E tensorflow/stream_executor/cuda/cuda_dnn.cc:352] could not destroy cudnn handle: CUDNN_STATUS_BAD_PARAM
2018-10-12 10:54:42.557484: F tensorflow/core/kernels/conv_ops.cc:667] Check failed: stream->parent()->GetConvolveAlgorithms( conv_parameters.ShouldIncludeWinogradNonfusedAlgo<T>(), &algorithms)
Aborted (core dumped)

and this is my small demo:

ims = tf.placeholder(tf.float32, [None, None, None, 3], name='img')
labels = tf.placeholder(tf.int32, [None, None, None, 1], name='labels')

feat = tf.layers.conv2d(ims, 3, [3, 3])
a = tf.nn.relu(feat)
feat = tf.layers.conv2d(a, 3, [3, 3])
b = tf.nn.relu(feat)
_a = tf.split(a, 3, axis=-1)
_b = tf.split(b, 3, axis=-1)
tmp = []
for __a, __b in zip(_a, _b):
    tmp.append(module.lattice_filter(__b, __a, bilateral=True, theta_alpha=8.0, theta_beta=0.125))
final = tf.concat(tmp, axis=-1)
with tf.Session() as sess:
    sess.run(tf.global_variables_initializer())
    out = sess.run(final, feed_dict={ims: np.random.rand(2, 32, 32, 3)})

Please help me.

fsk119 commented 5 years ago

Sorry, it's my mistake