title: google colaboratory `ResourceExhaustedError` with GPU
body: <p>I'm trying to fine-tune a <code>Vgg16</code> model using <code>colaboratory</code> but I ran into this error when training with the GPU.</p>
  
  <p><code>OOM when allocating tensor of shape [7,7,512,4096]</code></p>
  
  <pre><code>INFO:tensorflow:Error reported to Coordinator: &lt;class 'tensorflow.python.framework.errors_impl.ResourceExhaustedError'&gt;, OOM when allocating tensor of shape [7,7,512,4096] and type float
       [[Node: vgg_16/fc6/weights/Momentum/Initializer/zeros = Const[_class=["loc:@vgg_16/fc6/weights"], dtype=DT_FLOAT, value=Tensor&lt;type: float shape: [7,7,512,4096] values: [[[0 0 0]]]...&gt;, _device="/job:localhost/replica:0/task:0/device:GPU:0"]()]]
  
  Caused by op 'vgg_16/fc6/weights/Momentum/Initializer/zeros', defined at:
  </code></pre>
  
  <p>also have this output for my vm session:</p>
  
  <pre><code>    --- colab vm info ---
  python v=3.6.3
  tensorflow v=1.4.1
  tf device=/device:GPU:0
  model name  : Intel(R) Xeon(R) CPU @ 2.20GHz
  model name  : Intel(R) Xeon(R) CPU @ 2.20GHz
  MemTotal:       13341960 kB
  MemFree:         1541740 kB
  MemAvailable:   10035212 kB
  </code></pre>
  
  <p>My <code>tfrecord</code> is just 118 256x256 JPGs with <code>file size &lt;2MB</code></p>
  
  <p>Is there a workaround? it works when I use the CPU, just not the GPU</p>