I don’t think the error is raised due to the specific value and assume you would get the same OOM error, if you are using any other value.
The OOM might be raised by the indexing, since temp. tensors might need to be created.
Are you seeing an increased memory usage during training or are you close to an OOM from the beginning?