Created
August 14, 2022 17:27
-
-
Save Steboss89/51e36aa4829c05df818da70b2758e47e to your computer and use it in GitHub Desktop.
Generate random batches
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub fn generate_random_index(ArraySize: i64, BatchSize: i64)-> Tensor{ | |
let random_idxs = Tensor::randint(ArraySize, &[BatchSize], kind::INT64_CPU); | |
random_idxs | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment