<h5 dir="auto">System information (version)</h5>

<ul dir="auto">
<li>OpenCV =&gt; :3.4.6:</li>
<li>Operating System / Platform =&gt; :Windows 64 Bit:</li>
<li>Compiler =&gt; :python:</li>
</ul>
<h5 dir="auto">Detailed description</h5>

<p dir="auto">Unable to Generate a config file after transfer Learning for ssd_mobilenet_v1_fpn_coco tensorflow model</p>
<p dir="auto">1、Modified category<br>
2、Modified batch size 16</p>
<h5 dir="auto">Steps to reproduce</h5>

<p dir="auto">H:\data\object_detection&gt; python tf_text_graph_ssd.py --input model/frozen_inference_graph.pb --config model/pipeline<br>
.config --output data/graph.pbtxt<br>
Levels: [3-7]<br>
Anchor scale: 4.000000<br>
Scales per octave: 2<br>
Aspect ratios: [1.0, 2.0, 0.5]<br>
Number of classes: 10<br>
Number of layers: 5<br>
box predictor: weight_shared_convolutional<br>
Input image size: 640x640<br>
graph_def.node[0].op：Add<br>
Traceback (most recent call last):<br>
File "tf_text_graph_ssd.py", line 368, in <br>
createSSDGraph(args.input, args.config, args.output)<br>
File "tf_text_graph_ssd.py", line 233, in createSSDGraph<br>
assert(graph_def.node[0].op == 'Placeholder')<br>
AssertionError</p>
<p dir="auto">Transferred from <a href="http://code.opencv.org/issues/2844" rel="nofollow">http://code.opencv.org/issues/2844</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="|| Boris Mansencal on 2013-02-28 15:54
|| Priority: Normal
|| Affected: branch 'master' (2.4.9)
|| Category: gpu (cuda)
|| Tracker: Bug
|| Difficulty: None
|| PR: 
|| Platform: None / None"><pre class="notranslate"><code class="notranslate">|| Boris Mansencal on 2013-02-28 15:54
|| Priority: Normal
|| Affected: branch 'master' (2.4.9)
|| Category: gpu (cuda)
|| Tracker: Bug
|| Difficulty: None
|| PR: 
|| Platform: None / None
</code></pre></div>
<h2 dir="auto">build with CUDA 5.0 on macosx</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="I am trying to build current head version of OpenCV (02/28/2013) on a 2008 MacBook Pro with CUDA 5.0 enabled.

The configuration is :
Mac Book Pro 15&quot; (end 2008) with Intel Core 2 Duo 2.53GHz
Mac OS X 10.7.5
clang 4.1 
NVIDIA GeForce 9600M GT512MB 
CUDA 5.0 (V0.2.1221)

make VERBOSE=1
gives me the following error :

[ 23%] Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_matrix_operations.cu.o
cd /Users/mansencal/tools/opencv_git/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda &amp;&amp; &quot;/Applications/CMake 2.8-10.app/Contents/bin/cmake&quot; -E make_directory /Users/mansencal/tools/opencv_git/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/.
cd /Users/mansencal/tools/opencv_git/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda &amp;&amp; &quot;/Applications/CMake 2.8-10.app/Contents/bin/cmake&quot; -D verbose:BOOL=1 -D build_configuration:STRING=Release -D generated_file:STRING=/Users/mansencal/tools/opencv_git/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_matrix_operations.cu.o -D generated_cubin_file:STRING=/Users/mansencal/tools/opencv_git/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_matrix_operations.cu.o.cubin.txt -P /Users/mansencal/tools/opencv_git/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_matrix_operations.cu.o.cmake
-- Removing /Users/mansencal/tools/opencv_git/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_matrix_operations.cu.o
&quot;/Applications/CMake 2.8-10.app/Contents/bin/cmake&quot; -E remove /Users/mansencal/tools/opencv_git/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_matrix_operations.cu.o
-- Generating dependency file: /Users/mansencal/tools/opencv_git/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_matrix_operations.cu.o.NVCC-depend
/usr/local/cuda/bin/nvcc -M -D__CUDACC__ /Users/mansencal/tools/opencv_git/modules/core/src/cuda/matrix_operations.cu -o /Users/mansencal/tools/opencv_git/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_matrix_operations.cu.o NVCC-depend -ccbin /usr/bin/cc -m64 -DHAVE_CVCONFIG_H -DHAVE_ALLOCA -DHAVE_ALLOCA_H -DHAVE_LIBPTHREAD -DHAVE_UNISTD_H -Xcompiler ,\&quot;-O3\&quot;,\&quot;-DNDEBUG\&quot; -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode arch=compute_13,code=sm_13 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=sm_21 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_20,code=compute_20 -gencode arch=compute_30,code=compute_30 -Xcompiler -DCVAPI_EXPORTS -Xcompiler -fPIC -Xcompiler -fno-finite-math-only -DNVCC -I/usr/local/cuda/include -I/Users/mansencal/tools/opencv_git/modules/gpu/include -I/Users/mansencal/tools/opencv_git/build/3rdparty/zlib -I/Users/mansencal/tools/opencv_git/3rdparty/zlib -I/Users/mansencal/tools/opencv_git/build/modules/core -I/Users/mansencal/tools/opencv_git/modules/core/src -I/Users/mansencal/tools/opencv_git/modules/core/include -I/Users/mansencal/tools/opencv_git/build -I/Users/mansencal/tools/tbb41_20130116oss/include -I/Users/mansencal/tools/eigen-3.1.2 -I/usr/local/cuda/include
clang: error: unsupported option '-dumpspecs'
clang: error: no input files
CMake Error at cuda_compile_generated_matrix_operations.cu.o.cmake:206 (message):
  Error generating
  /Users/mansencal/tools/opencv_git/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_matrix_operations.cu.o


make[2]: *** [modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_matrix_operations.cu.o] Error 1
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make: *** [all] Error 2"><pre class="notranslate"><code class="notranslate">I am trying to build current head version of OpenCV (02/28/2013) on a 2008 MacBook Pro with CUDA 5.0 enabled.

The configuration is :
Mac Book Pro 15" (end 2008) with Intel Core 2 Duo 2.53GHz
Mac OS X 10.7.5
clang 4.1 
NVIDIA GeForce 9600M GT512MB 
CUDA 5.0 (V0.2.1221)

make VERBOSE=1
gives me the following error :

[ 23%] Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_matrix_operations.cu.o
cd /Users/mansencal/tools/opencv_git/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda &amp;&amp; "/Applications/CMake 2.8-10.app/Contents/bin/cmake" -E make_directory /Users/mansencal/tools/opencv_git/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/.
cd /Users/mansencal/tools/opencv_git/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda &amp;&amp; "/Applications/CMake 2.8-10.app/Contents/bin/cmake" -D verbose:BOOL=1 -D build_configuration:STRING=Release -D generated_file:STRING=/Users/mansencal/tools/opencv_git/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_matrix_operations.cu.o -D generated_cubin_file:STRING=/Users/mansencal/tools/opencv_git/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_matrix_operations.cu.o.cubin.txt -P /Users/mansencal/tools/opencv_git/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_matrix_operations.cu.o.cmake
-- Removing /Users/mansencal/tools/opencv_git/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_matrix_operations.cu.o
"/Applications/CMake 2.8-10.app/Contents/bin/cmake" -E remove /Users/mansencal/tools/opencv_git/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_matrix_operations.cu.o
-- Generating dependency file: /Users/mansencal/tools/opencv_git/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_matrix_operations.cu.o.NVCC-depend
/usr/local/cuda/bin/nvcc -M -D__CUDACC__ /Users/mansencal/tools/opencv_git/modules/core/src/cuda/matrix_operations.cu -o /Users/mansencal/tools/opencv_git/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_matrix_operations.cu.o NVCC-depend -ccbin /usr/bin/cc -m64 -DHAVE_CVCONFIG_H -DHAVE_ALLOCA -DHAVE_ALLOCA_H -DHAVE_LIBPTHREAD -DHAVE_UNISTD_H -Xcompiler ,\"-O3\",\"-DNDEBUG\" -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode arch=compute_13,code=sm_13 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=sm_21 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_20,code=compute_20 -gencode arch=compute_30,code=compute_30 -Xcompiler -DCVAPI_EXPORTS -Xcompiler -fPIC -Xcompiler -fno-finite-math-only -DNVCC -I/usr/local/cuda/include -I/Users/mansencal/tools/opencv_git/modules/gpu/include -I/Users/mansencal/tools/opencv_git/build/3rdparty/zlib -I/Users/mansencal/tools/opencv_git/3rdparty/zlib -I/Users/mansencal/tools/opencv_git/build/modules/core -I/Users/mansencal/tools/opencv_git/modules/core/src -I/Users/mansencal/tools/opencv_git/modules/core/include -I/Users/mansencal/tools/opencv_git/build -I/Users/mansencal/tools/tbb41_20130116oss/include -I/Users/mansencal/tools/eigen-3.1.2 -I/usr/local/cuda/include
clang: error: unsupported option '-dumpspecs'
clang: error: no input files
CMake Error at cuda_compile_generated_matrix_operations.cu.o.cmake:206 (message):
  Error generating
  /Users/mansencal/tools/opencv_git/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_matrix_operations.cu.o


make[2]: *** [modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_matrix_operations.cu.o] Error 1
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make: *** [all] Error 2
</code></pre></div>
<h2 dir="auto">History</h2>
<h5 dir="auto">Marina Kolpakova on 2013-03-01 08:33</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="-   Assignee set to Marina Kolpakova
-   Category set to gpu (cuda)"><pre class="notranslate"><code class="notranslate">-   Assignee set to Marina Kolpakova
-   Category set to gpu (cuda)
</code></pre></div>
<h5 dir="auto">Boris Mansencal on 2013-03-13 17:29</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="It seems this is the same bug than Bug #2504. So it is not solved.

It is related to the fact that -ccbin /usr/bin/cc is specified and /usr/bin/cc is a link to clang on recent MacOS X versions. 
It seems that it is FindCUDA.cmake, available with CMake 2.8.10, that sets CUDA_HOST_COMPILER to /usr/bin/cc."><pre class="notranslate"><code class="notranslate">It seems this is the same bug than Bug #2504. So it is not solved.

It is related to the fact that -ccbin /usr/bin/cc is specified and /usr/bin/cc is a link to clang on recent MacOS X versions. 
It seems that it is FindCUDA.cmake, available with CMake 2.8.10, that sets CUDA_HOST_COMPILER to /usr/bin/cc.
</code></pre></div>
<h5 dir="auto">Marina Kolpakova on 2013-04-05 23:30</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="-   Assignee deleted (Marina Kolpakova)"><pre class="notranslate"><code class="notranslate">-   Assignee deleted (Marina Kolpakova)
</code></pre></div>