Skip to content

Commit 0ad33d6

Browse files
authored
update tutorials for 0.4 (pytorch#223) (pytorch#224)
* Update beginner tutorials * Update rest tutorials * update q learning * format * rewrote part of fast neural transfer to add normalization and let it make much more sense * improve fast neural transfer code again
1 parent 24b7623 commit 0ad33d6

37 files changed

+897
-900
lines changed

Diff for: advanced_source/c_extension.rst

+1-2
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ import your extension just like a regular python file.
111111
# main.py
112112
import torch
113113
import torch.nn as nn
114-
from torch.autograd import Variable
115114
from modules.add import MyAddModule
116115
117116
class MyNetwork(nn.Module):
@@ -123,7 +122,7 @@ import your extension just like a regular python file.
123122
return self.add(input1, input2)
124123
125124
model = MyNetwork()
126-
input1, input2 = Variable(torch.randn(5, 5)), Variable(torch.randn(5, 5))
125+
input1, input2 = torch.randn(5, 5), torch.randn(5, 5)
127126
print(model(input1, input2))
128127
print(input1 + input2)
129128

0 commit comments

Comments
 (0)