Add:

gz = as_gpuarray_variable(gz)

We needed to add this to GpuFromHost for CudaNdarray.