title: Can't use tf.keras.optimizer with tf.keras.models.sequential
body: <p>I am using python 3 with conda and tensorflow, with the following code, in order to create tf.keras.models.sequential and optimize it with tf.keras.optimizer.Adam, and getting the following error: </p>
  
  <pre><code>from tensorflow.python.keras.models import Sequential
  from tensorflow.python.keras.datasets import mnist
  from tensorflow.python.keras.optimizers import Adam
  from tensorflow.python.keras.layers import Dense, Dropout
  from siamese import triplet_loss
  
  model = Sequential()
  model.add(Dense(units=100, input_shape=(784,), activation="relu"))
  model.compile(loss=triplet_loss.TripletLoss.semihard, optimizer=Adam())
  
  (train_x, train_y), (test_x, test_y) = mnist.load_data()
  train_x = train_x.reshape((-1, 784)) / 255.0
  print(train_x)
  </code></pre>
  
  <blockquote>
    <p>ValueError: optimizer must be an instance of tf.train.Optimizer, not a
    </p>
  </blockquote>
  
  <p>I tried importing an optimizer from tf.train but it does not seem to find anything to import... </p>
  
  <p>tf version is 1.12 </p>
  
  <p>Thanks</p>