tensorflow python 2.7 interactive shell: function call fails
<p><a href="http://i.stack.imgur.com/PieQ0.png" rel="nofollow"><img src="http://i.stack.imgur.com/PieQ0.png" alt="enter image description here"></a></p>

<p>I am studying udacity course: deep learning. Actually it teaches Google's tensorFlow. In Python interactive shell, I define the function softmax, when I invoke it, it says syntaxt error. Why? Any hint. </p>

<p>I have import numpy as np</p>

<pre><code>&gt;&gt;&gt; import numpy as np
&gt;&gt;&gt; import tensorflow as tf
&gt;&gt;&gt; def softmax(x):
...     return np.exp(x);
... softmax([1])
SyntaxError: invalid syntax
</code></pre>

<p>Are there requirment exact number of indention space? </p>

<p>When using interactive, make sure that the <code>...</code> is not there. The compiler will include anything in <code>...</code> in a function, method, while, or for block. To escape from the <code>...</code>, just hit enter again and call the method from <code>&gt;&gt;&gt;</code>. </p>

python tensorflow