<p dir="auto">Hi,</p>
<p dir="auto">I have a model that classifies RGB images and it works well.</p>
<p dir="auto">Now, I would like to use the same model on gray level images without re-training the new model. I could duplicate the gray level image in order to give it three identical channels, but it would use a excessive memory.<br>
So I would like to load the RGB model and get only the weights of a single channel (green for example) that I would affect to my gray level model.</p>
<p dir="auto">Any idea how I can access the weights of a given channel?</p>
<p dir="auto">Regards,</p>
<p dir="auto">Apologies if this has been reported already at some other place, I have been googling for it quite a bit, with my colleague without success.<br>
While running the simple mnist example with keras+tensorflow using P100 GPGPU we encounter an issue at the intersection of keras/tensorflow/cuda</p>
<p dir="auto">Using TensorFlow backend.<br>
Using TensorFlow backend.<br>
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcublas.so.8.0 locally<br>
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcudnn.so.5 locally<br>
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcufft.so.8.0 locally<br>
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcuda.so.1 locally<br>
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcurand.so.8.0 locally<br>
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcublas.so.8.0 locally<br>
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcudnn.so.5 locally<br>
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcufft.so.8.0 locally<br>
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcuda.so.1 locally<br>
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcurand.so.8.0 locally<br>
I tensorflow/core/common_runtime/gpu/gpu_device.cc:885] Found device 0 with properties:<br>
name: Tesla P100-PCIE-16GB<br>
major: 6 minor: 0 memoryClockRate (GHz) 1.3285<br>
pciBusID 0000:02:00.0<br>
Total memory: 15.89GiB<br>
Free memory: 15.51GiB<br>
I tensorflow/core/common_runtime/gpu/gpu_device.cc:906] DMA: 0<br>
I tensorflow/core/common_runtime/gpu/gpu_device.cc:916] 0:   Y<br>
I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -&gt; (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:02:00.0)<br>
I tensorflow/core/common_runtime/gpu/gpu_device.cc:885] Found device 0 with properties:<br>
name: Tesla P100-PCIE-16GB<br>
major: 6 minor: 0 memoryClockRate (GHz) 1.3285<br>
pciBusID 0000:02:00.0<br>
Total memory: 15.89GiB<br>
Free memory: 15.51GiB<br>
I tensorflow/core/common_runtime/gpu/gpu_device.cc:906] DMA: 0<br>
I tensorflow/core/common_runtime/gpu/gpu_device.cc:916] 0:   Y<br>
I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -&gt; (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:02:00.0)<br>
F tensorflow/core/common_runtime/gpu/gpu_device.cc:121] Check failed: err == cudaSuccess (71 vs. 0)<br>
F tensorflow/core/common_runtime/gpu/gpu_device.cc:121] Check failed: err == cudaSuccess (71 vs. 0)<br>
srun: error: nid05274: task 1: Aborted<br>
srun: Terminating job step 1250383.0<br>
srun: error: nid05271: task 0: Aborted</p>
<p dir="auto">we are using keras 2.0.2, tensorflow 1.0.0. cuda 8.0.53.<br>
We seem to be having this issue both in python2.7.12 and python3.5.2 (keras 1.2 and 2.0 ...)<br>
Bare tensorflow runtest are going fine, which lead us to think that this is really at the intersection of keras/tensorflow/cuda.<br>
There is no problem using the theano backend.</p>
<p dir="auto">The same test runs fine on various machine with the same version of the software but with TitanX GPGPU.</p>
<p dir="auto">I seem to be tracing this back to<br>
<a href="https://github.com/tensorflow/tensorflow/blob/r1.0/tensorflow/core/common_runtime/gpu/gpu_device.cc#L121">https://github.com/tensorflow/tensorflow/blob/r1.0/tensorflow/core/common_runtime/gpu/gpu_device.cc#L121</a></p>
<p dir="auto"><a href="http://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TYPES.html#group__CUDART__TYPES_1g3f51e3575c2178246db0a94a430e0038" rel="nofollow">http://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TYPES.html#group__CUDART__TYPES_1g3f51e3575c2178246db0a94a430e0038</a></p>
<p dir="auto">"""<br>
cudaErrorNotSupported = 71<br>
This error indicates the attempted operation is not supported on the current system or device.<br>
"""</p>
<p dir="auto">Would anyone have insights on what keras specific call is percolating to this unsupported cuda call ? It might be a cuda issue in the end, but this originates from using keras, hence this GH issue. thanks in advance for any help on the matter.</p>