This create a CudaNdarray view from the GpuArray. You need to tell Theano about this. So add the attribute view_map={0:0} to this class