title: Error adding layers in neural network in tensorflow
body: <pre><code>import tensorflow as tf
  
  from tensorflow.keras.datasets import mnist             
  from tensorflow.keras import models                     
  from tensorflow.keras import layers                     
  from tensorflow.keras.utils import to_categorical         
  
  network=models.Sequential()    # this initializes a sequential model that we will call network
  network.add(layers.Dense(10, activation = 'relu')    # this adds a dense hidden layer 
  network.add(layers.Dense(8, activation = 'softmax'))  # this is the output layer
  </code></pre>
  <p>I am trying to create a 2 layer neural network model in tensorflow and am getting this error:</p>
  <pre><code>File &quot;&lt;ipython-input-6-0dde2ff676f8&gt;&quot;, line 7
  network.add(layers.Dense(8, activation = 'softmax'))  # this is the output layer
        ^
  SyntaxError: invalid syntax
  </code></pre>
  <p>May I know why I'm getting this error for output layer but not for hidden layer? Thanks.</p>