Created
July 26, 2020 03:53
-
-
Save itsuncheng/9443ce32b7d6fff2c22200f5a779bcff to your computer and use it in GitHub Desktop.
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
| from __future__ import print_function | |
| #%matplotlib inline | |
| import argparse | |
| import os | |
| import random | |
| import torch | |
| import torch.nn as nn | |
| import torch.nn.parallel | |
| import torch.backends.cudnn as cudnn | |
| import torch.optim as optim | |
| import torch.utils.data | |
| import torchvision.datasets as dset | |
| import torchvision.transforms as transforms | |
| import torchvision.utils as vutils | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import matplotlib.animation as animation | |
| from IPython.display import HTML | |
| # Set random seem for reproducibility | |
| manualSeed = 999 | |
| #manualSeed = random.randint(1, 10000) # use if you want new results | |
| print("Random Seed: ", manualSeed) | |
| random.seed(manualSeed) | |
| torch.manual_seed(manualSeed) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment