title: crash on the GPU with {inc,set}_subtensor and broadcasting the value
body: <p>I am fine-tuning vgg16 network with keras 2.0.2 and theano 0.9.0 as backend on Windows10 64bit Anaconda 2 as this blog:<a href="https://blog.keras.io/building-powerful-image-classification-models-using-very-little-data.html" rel="nofollow noreferrer">https://blog.keras.io/building-powerful-image-classification-models-using-very-little-data.html</a></p>
  
  <p>I find someone else had the same issue in the pull requests and it was fixed by changing a few lines of code (link: <a href="https://github.com/Theano/Theano/pull/2075" rel="nofollow noreferrer">https://github.com/Theano/Theano/pull/2075</a>). However , that's an old version of theano.(the pr was in 2014) . Theano 0.9.0 have already change the code and I still have this problem</p>
  
  <p>every time I run the last line(i.e. model .fit_generator) , it shows that everything works fine until the last of first epoch. That's when exactly GPU always crash</p>
  
  <pre><code>model.fit_generator(
          train_generator,
          samples_per_epoch=2000,
          nb_epoch=50,
          validation_data=validation_generator,
          nb_val_samples=400)
  </code></pre>
  
  <p>And here is the error message:</p>
  
  <blockquote>
    <p>CudaNdarray_CopyFromCudaNdarray: need same dimensions for dim 0,
    destination=32, source=16Apply node that caused the error:
    GpuIncSubtensor{Set;::, ::, int64:int64:,
    int64:int64:}(GpuAlloc{memset_0=True}.0,
    GpuElemwise{mul,no_inplace}.0, Constant{1}, Constant{225},
    Constant{1}, Constant{225})Toposort index: 143</p>
  </blockquote>