title: 'Tensor' object has no attribute 'lower'
body: <p>I am fine-tuning a MobileNet with 14 new classes. When I add new layers by:</p>
  
  <pre><code>x=mobile.layers[-6].output
  x=Flatten(x)
  predictions = Dense(14, activation='softmax')(x)
  model = Model(inputs=mobile.input, outputs=predictions)
  </code></pre>
  
  <p>I get the error:</p>
  
  <pre><code>'Tensor' object has no attribute 'lower'
  </code></pre>
  
  <p>Also using:</p>
  
  <pre><code>model.compile(Adam(lr=.0001), loss='categorical_crossentropy', metrics=['accuracy'])
  model.fit_generator(train_batches, steps_per_epoch=18,
                  validation_data=valid_batches, validation_steps=3, epochs=60, verbose=2)
  </code></pre>
  
  <p>I get the error:</p>
  
  <pre><code>Error when checking target: expected dense_1 to have 4 dimensions, but got array with shape (10, 14)
  </code></pre>
  
  <p>What does <code>lower</code> mean? I saw other fine-tuning scripts and there were no other arguments other than the name of the model which is <code>x</code> in this case.</p>