google colabでKarasを使ったNotebookを実行。

No-GPUだと、エラー表示が無かった。

ResourceExhaustedError: OOM when allocating tensor of shape [3,3,256,512] and type float
     [[Node: training_1/SGD/zeros_14 = Const[dtype=DT_FLOAT, value=Tensor<type: float shape: [3,3,256,512] values: [[[0 0 0]]]...>, _device="/job:localhost/replica:0/task:0/device:GPU:0"]()]]

During handling of the above exception, another exception occurred:

ResourceExhaustedError                    Traceback (most recent call last)
<ipython-input-23-1e944e6043cb> in <module>()
----> 1 hist_obj = deconvNet.Train()

以下、そんな感じのリソース足らないメッセージがてんこ盛り。。

よろしくおねがいします。

ソースコード Notebook

!pip install pydot
!apt-get install -y -qq software-properties-common python-software-properties     module-init-tools
!add-apt-repository -y ppa:alessandro-strada/ppa 2>&1 > /dev/null
!apt-get update -qq 2>&1 > /dev/null
!apt-get -y install -qq google-drive-ocamlfuse fuse
from google.colab import auth
auth.authenticate_user()
from oauth2client.client import GoogleCredentials
creds = GoogleCredentials.get_application_default()
import getpass
!google-drive-ocamlfuse -headless -id={creds.client_id} -secret= 
{creds.client_secret} < /dev/null 2>&1 | grep URL
vcode = getpass.getpass()
!echo {vcode} | google-drive-ocamlfuse -headless -id={creds.client_id} - secret={creds.client_secret}

:
:

import keras
from keras.layers import Input, Dense, Lambda, Flatten, Reshape, 
Concatenate,Activation
from keras.layers import concatenate
from keras.layers import Conv2D, Conv2DTranspose, ZeroPadding2D,MaxPooling2D, 
Cropping2D, BatchNormalization
from keras.models import Model
from keras import metrics
from keras import backend as K
from keras import optimizers
from keras import losses
from keras.utils import plot_model
from keras.callbacks import Callback
from keras.applications.vgg16 import VGG16
from keras.applications.vgg16 import preprocess_input
import tensorflow as tf
import random
import time
import numpy as np
import skimage.io as io
import matplotlib
import matplotlib.pyplot as plt
%matplotlib inline
import pydot
from pyemd import emd, emd_samples