torch.mtia.set_rng_state¶ torch.mtia.set_rng_state(new_state, device='mtia')[source][source]¶ 設定亂數產生器狀態。 參數 new_state (torch.ByteTensor) – 期望的狀態 device (torch.device 或 int, 可選) – 設定 RNG 狀態的裝置。預設值: 'mtia' (即 torch.device('mtia'),目前的 mtia 裝置)。