This file contains hidden or 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
| -- multiple learning rates per network. Optimizes two copies of a model network and checks if the optimization steps (2) and (3) produce the same weights/parameters. | |
| require 'torch' | |
| require 'nn' | |
| require 'optim' | |
| torch.setdefaulttensortype('torch.FloatTensor') | |
| -- (1) Define a model for this example. | |
| local model = nn.Sequential() | |
| model:add(nn.Linear(10,20)) |