remove random seed

This commit is contained in:
Morvan Zhou
2017-12-15 14:21:23 +11:00
parent dcbd424b2a
commit 5df56c99dd
14 changed files with 17 additions and 17 deletions

View File

@ -11,7 +11,7 @@ from torch.autograd import Variable
import torch.nn.functional as F
import matplotlib.pyplot as plt
torch.manual_seed(1) # reproducible
# torch.manual_seed(1) # reproducible
x = torch.unsqueeze(torch.linspace(-1, 1, 100), dim=1) # x data (tensor), shape=(100, 1)
y = x.pow(2) + 0.2*torch.rand(x.size()) # noisy y data (tensor), shape=(100, 1)

View File

@ -11,7 +11,7 @@ from torch.autograd import Variable
import torch.nn.functional as F
import matplotlib.pyplot as plt
torch.manual_seed(1) # reproducible
# torch.manual_seed(1) # reproducible
# make fake data
n_data = torch.ones(100, 2)

View File

@ -10,7 +10,7 @@ import torch
from torch.autograd import Variable
import matplotlib.pyplot as plt
torch.manual_seed(1) # reproducible
# torch.manual_seed(1) # reproducible
# fake data
x = torch.unsqueeze(torch.linspace(-1, 1, 100), dim=1) # x data (tensor), shape=(100, 1)

View File

@ -12,7 +12,7 @@ import torch.nn.functional as F
from torch.autograd import Variable
import matplotlib.pyplot as plt
torch.manual_seed(1) # reproducible
# torch.manual_seed(1) # reproducible
LR = 0.01
BATCH_SIZE = 32

View File

@ -19,7 +19,7 @@ import torch.utils.data as Data
import torchvision
import matplotlib.pyplot as plt
torch.manual_seed(1) # reproducible
# torch.manual_seed(1) # reproducible
# Hyper Parameters
EPOCH = 1 # train the training data n times, to save time, we just train 1 epoch

View File

@ -15,7 +15,7 @@ import torchvision.transforms as transforms
import matplotlib.pyplot as plt
torch.manual_seed(1) # reproducible
# torch.manual_seed(1) # reproducible
# Hyper Parameters
EPOCH = 1 # train the training data n times, to save time, we just train 1 epoch

View File

@ -13,7 +13,7 @@ from torch.autograd import Variable
import numpy as np
import matplotlib.pyplot as plt
torch.manual_seed(1) # reproducible
# torch.manual_seed(1) # reproducible
# Hyper Parameters
TIME_STEP = 10 # rnn time step

View File

@ -18,7 +18,7 @@ from matplotlib import cm
import numpy as np
torch.manual_seed(1) # reproducible
# torch.manual_seed(1) # reproducible
# Hyper Parameters
EPOCH = 10

View File

@ -13,8 +13,8 @@ from torch.autograd import Variable
import numpy as np
import matplotlib.pyplot as plt
torch.manual_seed(1) # reproducible
np.random.seed(1)
# torch.manual_seed(1) # reproducible
# np.random.seed(1)
# Hyper Parameters
BATCH_SIZE = 64

View File

@ -13,8 +13,8 @@ from torch.autograd import Variable
import numpy as np
import matplotlib.pyplot as plt
torch.manual_seed(1) # reproducible
np.random.seed(1)
# torch.manual_seed(1) # reproducible
# np.random.seed(1)
# Hyper Parameters
BATCH_SIZE = 64

View File

@ -13,7 +13,7 @@ from torch.autograd import Variable
import numpy as np
import matplotlib.pyplot as plt
torch.manual_seed(1) # reproducible
# torch.manual_seed(1) # reproducible
# Hyper Parameters
INPUT_SIZE = 1 # rnn input size / image width

View File

@ -12,7 +12,7 @@ from torch.autograd import Variable
import torch.utils.data as Data
import torchvision
torch.manual_seed(1)
# torch.manual_seed(1)
EPOCH = 1
BATCH_SIZE = 50

View File

@ -10,7 +10,7 @@ import torch
from torch.autograd import Variable
import matplotlib.pyplot as plt
torch.manual_seed(1) # reproducible
# torch.manual_seed(1) # reproducible
N_SAMPLES = 20
N_HIDDEN = 300

View File

@ -16,8 +16,8 @@ import torch.nn.functional as F
import matplotlib.pyplot as plt
import numpy as np
torch.manual_seed(1) # reproducible
np.random.seed(1)
# torch.manual_seed(1) # reproducible
# np.random.seed(1)
# Hyper parameters
N_SAMPLES = 2000