Bugfix: incorrect CudaTensor.max