correct gpu max_idx
idx to max
idx to max