/usr/local/lib64/python3.6/site-packages/torch/__pycache__
NameSizeModeActions
autocast_mode.cpython-36.pyc90400644editdlrm
functional.cpython-36.pyc599640644editdlrm
hub.cpython-36.pyc191710644editdlrm
overrides.cpython-36.pyc1243060644editdlrm
quasirandom.cpython-36.pyc67390644editdlrm
random.cpython-36.pyc42710644editdlrm
serialization.cpython-36.pyc285820644editdlrm
storage.cpython-36.pyc83340644editdlrm
torch_version.cpython-36.pyc29650644editdlrm
types.cpython-36.pyc17350644editdlrm
version.cpython-36.pyc2720644editdlrm
_appdirs.cpython-36.pyc220230644editdlrm
_classes.cpython-36.pyc24730644editdlrm
_deploy.cpython-36.pyc22620644editdlrm
_jit_internal.cpython-36.pyc337230644editdlrm
_linalg_utils.cpython-36.pyc28830644editdlrm
_lobpcg.cpython-36.pyc302630644editdlrm
_lowrank.cpython-36.pyc94730644editdlrm
_namedtensor_internals.cpython-36.pyc48560644editdlrm
_ops.cpython-36.pyc41770644editdlrm
_python_dispatcher.cpython-36.pyc34110644editdlrm
_six.cpython-36.pyc10930644editdlrm
_sources.cpython-36.pyc40430644editdlrm
_storage_docs.cpython-36.pyc14360644editdlrm
_tensor.cpython-36.pyc372740644editdlrm
_tensor_docs.cpython-36.pyc1027930644editdlrm
_tensor_str.cpython-36.pyc115320644editdlrm
_torch_docs.cpython-36.pyc3646960644editdlrm
_utils.cpython-36.pyc168940644editdlrm
_utils_internal.cpython-36.pyc13220644editdlrm
_VF.cpython-36.pyc11120644editdlrm
_vmap_internals.cpython-36.pyc112100644editdlrm
__config__.cpython-36.pyc7330644editdlrm
__future__.cpython-36.pyc9840644editdlrm
__init__.cpython-36.pyc244180644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/torch/__pycache__/random.cpython-36.pyc (4271B)
3 Eg@sddlZddlmZddlZddlmZddlZejddddZejddd Z ej jdd d Z e dd d Z e dddZdaejdedddZdS)N) Generator)default_generator) new_statereturncCstj|dS)zSets the random number generator state. .. note: This function only works for CPU. For CUDA, please use torch.manual_seed(seed), which works for both CPU and CUDA. Args: new_state (torch.ByteTensor): The desired state N)rZ set_state)rr8/usr/local/lib64/python3.6/site-packages/torch/random.py set_rng_state s r)rcCstjS)zBReturns the random number generator state as a `torch.ByteTensor`.)rZ get_staterrrr get_rng_statesr cCs0t|}ddl}|jjs&|jj|tj|S)aSets the seed for generating random numbers. Returns a `torch.Generator` object. Args: seed (int): The desired seed. Value must be within the inclusive range `[-0x8000_0000_0000_0000, 0xffff_ffff_ffff_ffff]`. Otherwise, a RuntimeError is raised. Negative inputs are remapped to positive values with the formula `0xffff_ffff_ffff_ffff + seed`. rN)int torch.cudacuda_is_in_bad_forkmanual_seed_allr manual_seed)seedtorchrrrrs   rcCs*tj}ddl}|jjs&|jj||S)zSets the seed for generating random numbers to a non-deterministic random number. Returns a 64 bit number used to seed the RNG. rN)rrr r r r)rrrrrr-s   rcCstjS)zSReturns the initial seed for generating random numbers as a Python `long`. )r initial_seedrrrrr:srFTfork_rngdevicesc csddl}|sdVdS|dkr^|jj}|dkrPt rPtjdj|||ddatt|}nt|}|j }g}x|D]}|j |jj |qxWz dVWd|j |x$t ||D]\}} |jj | |qWXdS)a Forks the RNG, so that when you return, the RNG is reset to the state that it was previously in. Args: devices (iterable of CUDA IDs): CUDA devices for which to fork the RNG. CPU RNG state is always forked. By default, :meth:`fork_rng` operates on all devices, but will emit a warning if your machine has a lot of devices, since this function will run very slowly in that case. If you explicitly specify devices, this warning will be suppressed enabled (bool): if ``False``, the RNG is not forked. This is a convenience argument for easily disabling the context manager without having to delete it and unindent your Python code under it. rNaCUDA reports that you have {num_devices} available devices, and you have used {caller} without explicitly specifying which devices are being used. For safety, we initialize *every* CUDA device by default, which can be quite slow if you have a lot of GPUs. If you know that you are only making use of a few CUDA devices, set the environment variable CUDA_VISIBLE_DEVICES or the '{devices_kw}' keyword argument of {caller} with the set of devices you are actually using. For example, if you are using CPU only, set CUDA_VISIBLE_DEVICES= or devices=[]; if you are using GPU 0 only, set CUDA_VISIBLE_DEVICES=0 or devices=[0]. To initialize all devices and suppress this warning, set the '{devices_kw}' keyword argument to `range(torch.cuda.device_count())`.) num_devicesZcallerZ devices_kwT) r r Z device_count_fork_rng_warned_alreadywarningswarnformatlistranger appendrzip) renabledZ_callerZ _devices_kwrrZ cpu_rng_stateZgpu_rng_statesZdeviceZ gpu_rng_staterrrrDs,     )NTrr) contextlibtypingrrZtorch._CrrZTensorrr _Crr rrrcontextmanagerrrrrrs