<p dir="auto">In the procedure of installing from source,<br>
when I try to do "bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg"</p>
<p dir="auto">then an error occurs and the message is like this:<br>
"error: can't copy 'tensorflow/models/embedding/gen_word2vec.py': doesn't exist or not a regular file"</p>
<p dir="auto">In the directory of '<em>tensorflow/models/embedding/</em>', there does not exist named "gen_word2vec.py", only "word2vec.py" is in there.<br>
(Changing the file name "word2vec.py" as "gen_word2vec.py", but it does not make it.)</p>
<p dir="auto">OS : OS X El Capitan(10.11.6)<br>
TensorFlow : r0.11(Same problem occurs r0.10)</p>
<p dir="auto">In <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="175361107" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/4234" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/4234/hovercard" href="https://github.com/tensorflow/tensorflow/issues/4234">#4234</a>, recommended method is installing the TF's branch r0.10, but it does not work for me.<br>
How can I solve it?</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/22737703/19625753/111ae2aa-995c-11e6-93c0-464fb1443589.png"><img width="656" alt="2016-10-23 8 05 16" src="https://cloud.githubusercontent.com/assets/22737703/19625753/111ae2aa-995c-11e6-93c0-464fb1443589.png" style="max-width: 100%;"></a></p>
<p dir="auto">I’m running into a couple of issues with <code class="notranslate">transpose</code> on GPUs. First, even the forward computation can’t be registered on a GPU unless I explicitly set the <code class="notranslate">perm</code> option. For example this fails (I’m setting <code class="notranslate">allow_soft_placement=False</code> in the session <code class="notranslate">Config</code>):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="with tf.device('/gpu:0'):
    a = tf.constant(npr.rand(5, 3).astype('float32'))
    b = tf.transpose(a)"><pre class="notranslate"><code class="notranslate">with tf.device('/gpu:0'):
    a = tf.constant(npr.rand(5, 3).astype('float32'))
    b = tf.transpose(a)
</code></pre></div>
<p dir="auto">with the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="InvalidArgumentError: Cannot assign a device to node 'transpose/Reverse': Could not satisfy explicit device specification '/gpu:0'
[[Node: transpose/Reverse = Reverse[T=DT_INT32, _device=&quot;/gpu:0&quot;](transpose/Range, transpose/Reverse/dims)]]"><pre class="notranslate"><code class="notranslate">InvalidArgumentError: Cannot assign a device to node 'transpose/Reverse': Could not satisfy explicit device specification '/gpu:0'
[[Node: transpose/Reverse = Reverse[T=DT_INT32, _device="/gpu:0"](transpose/Range, transpose/Reverse/dims)]]
</code></pre></div>
<p dir="auto">If however I set <code class="notranslate">perm=(1, 0)</code> in the <code class="notranslate">transpose</code> operation above, it works. But that’s not the only problem, as the backward computation doesn’t work either way. For example this fails:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="with tf.device('/gpu:0'):
    a = tf.Variable(tf.random_uniform([5, 3]))
    b = tf.transpose(a, perm=(1, 0))
    l = tf.reduce_sum(b)
    o = tf.train.AdamOptimizer().minimize(l)
    i = tf.initialize_all_variables()

sess = tf.Session(config=tf.ConfigProto(allow_soft_placement=False))
sess.run(i)
sess.run(o)"><pre class="notranslate"><code class="notranslate">with tf.device('/gpu:0'):
    a = tf.Variable(tf.random_uniform([5, 3]))
    b = tf.transpose(a, perm=(1, 0))
    l = tf.reduce_sum(b)
    o = tf.train.AdamOptimizer().minimize(l)
    i = tf.initialize_all_variables()

sess = tf.Session(config=tf.ConfigProto(allow_soft_placement=False))
sess.run(i)
sess.run(o)
</code></pre></div>
<p dir="auto">with the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="InvalidArgumentError: Cannot assign a device to node 'gradients/transpose_grad/InvertPermutation': Could not satisfy explicit device specification '/gpu:0'
[[Node: gradients/transpose_grad/InvertPermutation = InvertPermutation[_device=&quot;/gpu:0&quot;](transpose/perm)]]"><pre class="notranslate"><code class="notranslate">InvalidArgumentError: Cannot assign a device to node 'gradients/transpose_grad/InvertPermutation': Could not satisfy explicit device specification '/gpu:0'
[[Node: gradients/transpose_grad/InvertPermutation = InvertPermutation[_device="/gpu:0"](transpose/perm)]]
</code></pre></div>