utils

General utility functions for PyTorch.

torchutils.utils.set_random_seed(seed)

Set random seed for numpy, torch and torch.cuda.

Parameters

seed (int) – Seed value.

Returns

Returns nothing.

Return type

None

Example:

import torchutils as tu

tu.set_random_seed(2222)