<h3 dir="auto">System information</h3>
<ul dir="auto">
<li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>: Yes</li>
<li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>: Mac OS X 10.11.6</li>
<li><strong>TensorFlow installed from (source or binary)</strong>: binary</li>
<li><strong>TensorFlow version (use command below)</strong>: 1.3.0</li>
<li><strong>Python version</strong>: 3.5.2</li>
<li><strong>Bazel version (if compiling from source)</strong>:</li>
<li><strong>CUDA/cuDNN version</strong>:</li>
<li><strong>GPU model and memory</strong>:</li>
<li><strong>Exact command to reproduce</strong>:</li>
</ul>
<h3 dir="auto">Describe the problem</h3>
<p dir="auto">It seems that the same feature column creates two tensors for <code class="notranslate">DNNLinearCombinedRegressor</code> (see <code class="notranslate">voc_embed</code> in graph below). Is this the right behavior we expected?</p>
<p dir="auto">The behavior stems from that feature column is processed by DNN and Linear independently, see code: <a href="https://github.com/tensorflow/tensorflow/blob/b46340f40fe5e2ec9bfcd385b07cfb914055fb51/tensorflow/python/estimator/canned/dnn_linear_combined.py#L154">dnn</a> and <a href="https://github.com/tensorflow/tensorflow/blob/b46340f40fe5e2ec9bfcd385b07cfb914055fb51/tensorflow/python/estimator/canned/dnn_linear_combined.py#L196">linear</a></p>
<h3 dir="auto">Source code / logs</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# coding: utf-8
import tensorflow as tf
from tensorflow import feature_column as fc

f = fc.embedding_column(
        fc.categorical_column_with_vocabulary_list(&quot;voc&quot;, [&quot;a&quot;, &quot;b&quot;]),
        dimension=8)
e = tf.estimator.DNNLinearCombinedRegressor(
        model_dir=&quot;/tmp/tf/test_dnn&quot;,
        linear_feature_columns=[f],
        dnn_feature_columns=[f],
        dnn_hidden_units=[10])

def input_fn():
    return ({&quot;voc&quot;: tf.identity(
                        tf.constant([&quot;a&quot;, &quot;b&quot;, &quot;a&quot;], name=&quot;voc_input&quot;),
                        name=&quot;identity&quot;)},
            tf.constant([1, 0, 1]))

e.train(input_fn, steps=10)"><pre class="notranslate"><span class="pl-c"># coding: utf-8</span>
<span class="pl-k">import</span> <span class="pl-s1">tensorflow</span> <span class="pl-k">as</span> <span class="pl-s1">tf</span>
<span class="pl-k">from</span> <span class="pl-s1">tensorflow</span> <span class="pl-k">import</span> <span class="pl-s1">feature_column</span> <span class="pl-k">as</span> <span class="pl-s1">fc</span>

<span class="pl-s1">f</span> <span class="pl-c1">=</span> <span class="pl-s1">fc</span>.<span class="pl-en">embedding_column</span>(
        <span class="pl-s1">fc</span>.<span class="pl-en">categorical_column_with_vocabulary_list</span>(<span class="pl-s">"voc"</span>, [<span class="pl-s">"a"</span>, <span class="pl-s">"b"</span>]),
        <span class="pl-s1">dimension</span><span class="pl-c1">=</span><span class="pl-c1">8</span>)
<span class="pl-s1">e</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">estimator</span>.<span class="pl-v">DNNLinearCombinedRegressor</span>(
        <span class="pl-s1">model_dir</span><span class="pl-c1">=</span><span class="pl-s">"/tmp/tf/test_dnn"</span>,
        <span class="pl-s1">linear_feature_columns</span><span class="pl-c1">=</span>[<span class="pl-s1">f</span>],
        <span class="pl-s1">dnn_feature_columns</span><span class="pl-c1">=</span>[<span class="pl-s1">f</span>],
        <span class="pl-s1">dnn_hidden_units</span><span class="pl-c1">=</span>[<span class="pl-c1">10</span>])

<span class="pl-k">def</span> <span class="pl-en">input_fn</span>():
    <span class="pl-k">return</span> ({<span class="pl-s">"voc"</span>: <span class="pl-s1">tf</span>.<span class="pl-en">identity</span>(
                        <span class="pl-s1">tf</span>.<span class="pl-en">constant</span>([<span class="pl-s">"a"</span>, <span class="pl-s">"b"</span>, <span class="pl-s">"a"</span>], <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">"voc_input"</span>),
                        <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">"identity"</span>)},
            <span class="pl-s1">tf</span>.<span class="pl-en">constant</span>([<span class="pl-c1">1</span>, <span class="pl-c1">0</span>, <span class="pl-c1">1</span>]))

<span class="pl-s1">e</span>.<span class="pl-en">train</span>(<span class="pl-s1">input_fn</span>, <span class="pl-s1">steps</span><span class="pl-c1">=</span><span class="pl-c1">10</span>)</pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1112263/30632078-63853988-9e19-11e7-94c8-c660c6ed55e2.png"><img src="https://user-images.githubusercontent.com/1112263/30632078-63853988-9e19-11e7-94c8-c660c6ed55e2.png" alt="graph-large_attrs_key _too_large_attrs limit_attr_size 1024 run 1" style="max-width: 100%;"></a></p>
<h3 dir="auto">Environment info</h3>
<p dir="auto">Operating System:<br>
OS  10.10.5</p>
<p dir="auto">Installed version of CUDA and cuDNN:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ls -l /usr/local/cuda/lib/libcud*
-rwxr-xr-x  1 root           wheel      8280 Apr 13 01:02 /usr/local/cuda/lib/libcuda.dylib
lrwxr-xr-x  1 root           wheel        45 Apr 13 01:03 /usr/local/cuda/lib/libcudadevrt.a -&gt; /Developer/NVIDIA/CUDA-7.5/lib/libcudadevrt.a
lrwxr-xr-x  1 root           wheel        50 Apr 13 01:03 /usr/local/cuda/lib/libcudart.7.5.dylib -&gt; /Developer/NVIDIA/CUDA-7.5/lib/libcudart.7.5.dylib
lrwxr-xr-x  1 root           wheel        46 Apr 13 01:03 /usr/local/cuda/lib/libcudart.dylib -&gt; /Developer/NVIDIA/CUDA-7.5/lib/libcudart.dylib
lrwxr-xr-x  1 root           wheel        49 Apr 13 01:03 /usr/local/cuda/lib/libcudart_static.a -&gt; /Developer/NVIDIA/CUDA-7.5/lib/libcudart_static.a
-rwxr-xr-x@ 1 production204  staff  60108616 Feb  8  2016 /usr/local/cuda/lib/libcudnn.4.dylib
lrwxr-xr-x  1 root           admin        47 Aug 29 18:08 /usr/local/cuda/lib/libcudnn.5.dylib -&gt; /Developer/NVIDIA/CUDA-7.5/lib/libcudnn.5.dylib
lrwxr-xr-x  1 root           admin        45 Aug 29 18:08 /usr/local/cuda/lib/libcudnn.dylib -&gt; /Developer/NVIDIA/CUDA-7.5/lib/libcudnn.dylib
-rw-r--r--@ 1 production204  staff  59311504 Feb  8  2016 /usr/local/cuda/lib/libcudnn_static.a"><pre class="notranslate"><code class="notranslate">$ ls -l /usr/local/cuda/lib/libcud*
-rwxr-xr-x  1 root           wheel      8280 Apr 13 01:02 /usr/local/cuda/lib/libcuda.dylib
lrwxr-xr-x  1 root           wheel        45 Apr 13 01:03 /usr/local/cuda/lib/libcudadevrt.a -&gt; /Developer/NVIDIA/CUDA-7.5/lib/libcudadevrt.a
lrwxr-xr-x  1 root           wheel        50 Apr 13 01:03 /usr/local/cuda/lib/libcudart.7.5.dylib -&gt; /Developer/NVIDIA/CUDA-7.5/lib/libcudart.7.5.dylib
lrwxr-xr-x  1 root           wheel        46 Apr 13 01:03 /usr/local/cuda/lib/libcudart.dylib -&gt; /Developer/NVIDIA/CUDA-7.5/lib/libcudart.dylib
lrwxr-xr-x  1 root           wheel        49 Apr 13 01:03 /usr/local/cuda/lib/libcudart_static.a -&gt; /Developer/NVIDIA/CUDA-7.5/lib/libcudart_static.a
-rwxr-xr-x@ 1 production204  staff  60108616 Feb  8  2016 /usr/local/cuda/lib/libcudnn.4.dylib
lrwxr-xr-x  1 root           admin        47 Aug 29 18:08 /usr/local/cuda/lib/libcudnn.5.dylib -&gt; /Developer/NVIDIA/CUDA-7.5/lib/libcudnn.5.dylib
lrwxr-xr-x  1 root           admin        45 Aug 29 18:08 /usr/local/cuda/lib/libcudnn.dylib -&gt; /Developer/NVIDIA/CUDA-7.5/lib/libcudnn.dylib
-rw-r--r--@ 1 production204  staff  59311504 Feb  8  2016 /usr/local/cuda/lib/libcudnn_static.a
</code></pre></div>
<ol dir="auto">
<li>The output from <code class="notranslate">python -c "import tensorflow; print(tensorflow.__version__)"</code>.<br>
(can't get that far, but i'm using 0.10)</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; import tensorflow
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcublas.dylib locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcudnn.dylib locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcufft.dylib locally
Segmentation fault: 11
"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; import tensorflow
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcublas.dylib locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcudnn.dylib locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcufft.dylib locally
Segmentation fault: 11

</code></pre></div>
<p dir="auto">If installed from source, provide</p>
<ol dir="auto">
<li>The commit hash (<code class="notranslate">git rev-parse HEAD</code>)</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="4c49dbebef05442c7e72d6129a30574fcd13f0e1"><pre class="notranslate"><code class="notranslate">4c49dbebef05442c7e72d6129a30574fcd13f0e1
</code></pre></div>
<ol dir="auto">
<li>The output of <code class="notranslate">bazel version</code></li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ bazel version
Build label: 0.3.1-homebrew
Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Thu Aug 4 09:59:58 2016 (1470304798)
Build timestamp: 1470304798
Build timestamp as int: 1470304798"><pre class="notranslate"><code class="notranslate">$ bazel version
Build label: 0.3.1-homebrew
Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Thu Aug 4 09:59:58 2016 (1470304798)
Build timestamp: 1470304798
Build timestamp as int: 1470304798
</code></pre></div>
<h3 dir="auto">If possible, provide a minimal reproducible example (We usually don't have time to read hundreds of lines of your code)</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer
ERROR: no such package '@local_config_cuda//crosstool': BUILD file not found on package path.
ERROR: no such package '@local_config_cuda//crosstool': BUILD file not found on package path.
INFO: Elapsed time: 0.076s
"><pre class="notranslate"><code class="notranslate">$ bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer
ERROR: no such package '@local_config_cuda//crosstool': BUILD file not found on package path.
ERROR: no such package '@local_config_cuda//crosstool': BUILD file not found on package path.
INFO: Elapsed time: 0.076s

</code></pre></div>
<h3 dir="auto">What other attempted solutions have you tried?</h3>
<ul dir="auto">
<li>Downgrading to cuDNN4, switching between 4 and 5</li>
<li>Re-installing bazel</li>
<li>Modifying CROSSTOOL file according to various threads</li>
<li>Manually linking CUDA libraries during <code class="notranslate">./configure</code> to not use symlinked libraries</li>
<li>Various other hacks over the last week <g-emoji class="g-emoji" alias="sob" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f62d.png">😭</g-emoji></li>
</ul>