This file contains 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
import torch | |
import torch.nn as nn | |
from torch.autograd import Variable | |
import torch.optim as optim | |
a = torch.ones(1,2) | |
b = torch.nn.Linear(2,1) | |
b.zero_grad() | |
c = b(Variable(a)) |
This file contains 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
diff --git a/gan_pytorch.py b/gan_pytorch.py | |
index 0bff38c..802d6cb 100755 | |
--- a/gan_pytorch.py | |
+++ b/gan_pytorch.py | |
@@ -31,7 +31,7 @@ g_steps = 1 | |
# ### Uncomment only one of these | |
#(name, preprocess, d_input_func) = ("Raw data", lambda data: data, lambda x: x) | |
-(name, preprocess, d_input_func) = ("Data and variances", lambda data: decorate_with_diffs(data, 2.0), lambda x: x * 2) | |
+(name, preprocess, d_input_func) = ("Data and variances", lambda data: decorate_with_diffs(data, 2.0), lambda x: x) |