remove random seed
This commit is contained in:
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user