Skip to content
This repository has been archived by the owner on Oct 27, 2023. It is now read-only.

Commit

Permalink
update tutorials for 0.4 (pytorch#223) (pytorch#224)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
soumith authored Apr 24, 2018
1 parent fbb06a8 commit 81f2a04
Show file tree
Hide file tree
Showing 37 changed files with 897 additions and 900 deletions.
3 changes: 1 addition & 2 deletions advanced_source/c_extension.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ import your extension just like a regular python file.
# main.py
import torch
import torch.nn as nn
from torch.autograd import Variable
from modules.add import MyAddModule
class MyNetwork(nn.Module):
Expand All @@ -123,7 +122,7 @@ import your extension just like a regular python file.
return self.add(input1, input2)
model = MyNetwork()
input1, input2 = Variable(torch.randn(5, 5)), Variable(torch.randn(5, 5))
input1, input2 = torch.randn(5, 5), torch.randn(5, 5)
print(model(input1, input2))
print(input1 + input2)
Expand Down
Loading

0 comments on commit 81f2a04

Please sign in to comment.