Skip to content

Commit 5df56c9

Browse files
committed
remove random seed
1 parent dcbd424 commit 5df56c9

14 files changed

+17
-17
lines changed

tutorial-contents/301_regression.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import torch.nn.functional as F
1212
import matplotlib.pyplot as plt
1313

14-
torch.manual_seed(1) # reproducible
14+
# torch.manual_seed(1) # reproducible
1515

1616
x = torch.unsqueeze(torch.linspace(-1, 1, 100), dim=1) # x data (tensor), shape=(100, 1)
1717
y = x.pow(2) + 0.2*torch.rand(x.size()) # noisy y data (tensor), shape=(100, 1)

tutorial-contents/302_classification.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import torch.nn.functional as F
1212
import matplotlib.pyplot as plt
1313

14-
torch.manual_seed(1) # reproducible
14+
# torch.manual_seed(1) # reproducible
1515

1616
# make fake data
1717
n_data = torch.ones(100, 2)

tutorial-contents/304_save_reload.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from torch.autograd import Variable
1111
import matplotlib.pyplot as plt
1212

13-
torch.manual_seed(1) # reproducible
13+
# torch.manual_seed(1) # reproducible
1414

1515
# fake data
1616
x = torch.unsqueeze(torch.linspace(-1, 1, 100), dim=1) # x data (tensor), shape=(100, 1)

tutorial-contents/306_optimizer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from torch.autograd import Variable
1313
import matplotlib.pyplot as plt
1414

15-
torch.manual_seed(1) # reproducible
15+
# torch.manual_seed(1) # reproducible
1616

1717
LR = 0.01
1818
BATCH_SIZE = 32

tutorial-contents/401_CNN.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import torchvision
2020
import matplotlib.pyplot as plt
2121

22-
torch.manual_seed(1) # reproducible
22+
# torch.manual_seed(1) # reproducible
2323

2424
# Hyper Parameters
2525
EPOCH = 1 # train the training data n times, to save time, we just train 1 epoch

tutorial-contents/402_RNN_classifier.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import matplotlib.pyplot as plt
1616

1717

18-
torch.manual_seed(1) # reproducible
18+
# torch.manual_seed(1) # reproducible
1919

2020
# Hyper Parameters
2121
EPOCH = 1 # train the training data n times, to save time, we just train 1 epoch

tutorial-contents/403_RNN_regressor.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import numpy as np
1414
import matplotlib.pyplot as plt
1515

16-
torch.manual_seed(1) # reproducible
16+
# torch.manual_seed(1) # reproducible
1717

1818
# Hyper Parameters
1919
TIME_STEP = 10 # rnn time step

tutorial-contents/404_autoencoder.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import numpy as np
1919

2020

21-
torch.manual_seed(1) # reproducible
21+
# torch.manual_seed(1) # reproducible
2222

2323
# Hyper Parameters
2424
EPOCH = 10

tutorial-contents/406_GAN.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
import numpy as np
1414
import matplotlib.pyplot as plt
1515

16-
torch.manual_seed(1) # reproducible
17-
np.random.seed(1)
16+
# torch.manual_seed(1) # reproducible
17+
# np.random.seed(1)
1818

1919
# Hyper Parameters
2020
BATCH_SIZE = 64

tutorial-contents/406_conditional_GAN.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
import numpy as np
1414
import matplotlib.pyplot as plt
1515

16-
torch.manual_seed(1) # reproducible
17-
np.random.seed(1)
16+
# torch.manual_seed(1) # reproducible
17+
# np.random.seed(1)
1818

1919
# Hyper Parameters
2020
BATCH_SIZE = 64

tutorial-contents/501_why_torch_dynamic_graph.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import numpy as np
1414
import matplotlib.pyplot as plt
1515

16-
torch.manual_seed(1) # reproducible
16+
# torch.manual_seed(1) # reproducible
1717

1818
# Hyper Parameters
1919
INPUT_SIZE = 1 # rnn input size / image width

tutorial-contents/502_GPU.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import torch.utils.data as Data
1313
import torchvision
1414

15-
torch.manual_seed(1)
15+
# torch.manual_seed(1)
1616

1717
EPOCH = 1
1818
BATCH_SIZE = 50

tutorial-contents/503_dropout.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from torch.autograd import Variable
1111
import matplotlib.pyplot as plt
1212

13-
torch.manual_seed(1) # reproducible
13+
# torch.manual_seed(1) # reproducible
1414

1515
N_SAMPLES = 20
1616
N_HIDDEN = 300

tutorial-contents/504_batch_normalization.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
import matplotlib.pyplot as plt
1717
import numpy as np
1818

19-
torch.manual_seed(1) # reproducible
20-
np.random.seed(1)
19+
# torch.manual_seed(1) # reproducible
20+
# np.random.seed(1)
2121

2222
# Hyper parameters
2323
N_SAMPLES = 2000

0 commit comments

Comments
 (0)