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
| from __future__ import print_function | |
| import tensorflow as tf | |
| import sys | |
| import time | |
| # cluster specification | |
| parameter_servers = ["localhost:2222"] | |
| workers = [ "localhost:2223", | |
| "localhost:2224"] |
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)) |