Download pytorch3d/projects/implicitron_trainer/impl/utils.py from ameerazam08/Real3DPortrait: direct link, hf CLI and curl.
- Browser
- Download file 382 Bytes
-
https://huggingface.co/ameerazam08/Real3DPortrait/resolve/main/pytorch3d/projects/implicitron_trainer/impl/utils.py
- Command line
-
hf download hf://ameerazam08/Real3DPortrait/pytorch3d/projects/implicitron_trainer/impl/utils.py
-
curl -L -o utils.py https://huggingface.co/ameerazam08/Real3DPortrait/resolve/main/pytorch3d/projects/implicitron_trainer/impl/utils.py
382 Bytes
| # Copyright (c) Meta Platforms, Inc. and affiliates. | |
| # All rights reserved. | |
| # | |
| # This source code is licensed under the BSD-style license found in the | |
| # LICENSE file in the root directory of this source tree. | |
| import random | |
| import numpy as np | |
| import torch | |
| def seed_all_random_engines(seed: int) -> None: | |
| np.random.seed(seed) | |
| torch.manual_seed(seed) | |
| random.seed(seed) | |