Changing sizes and copying back outputs to host