Skip to content

Commit

Permalink
Update mnist example to use new module name
Browse files Browse the repository at this point in the history
  • Loading branch information
shinh committed Jan 16, 2019
1 parent 0977609 commit 9fe3111
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/mnist/train_mnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
sys.path.append(os.path.join(project_root, 'python'))
sys.path.append(os.path.join(project_root, 'build/python'))

import oniku
import chainer_compiler


# Network definition
Expand Down Expand Up @@ -79,7 +79,7 @@ def main():
group = parser.add_argument_group('deprecated arguments')
group.add_argument('--gpu', '-g', type=int, nargs='?', const=0,
help='GPU ID (negative value indicates CPU)')
parser.add_argument('--oniku', action='store_true',
parser.add_argument('--compile', action='store_true',
help='Compile the model')
parser.add_argument('--dump_onnx', action='store_true',
help='Dump ONNX model after optimization')
Expand All @@ -97,8 +97,8 @@ def main():
# Classifier reports softmax cross entropy loss and accuracy at every
# iteration, which will be used by the PrintReport extension below.
mlp = MLP(args.unit, 10)
if args.oniku:
mlp = oniku.compile(mlp, dump_onnx=args.dump_onnx)
if args.compile:
mlp = chainer_compiler.compile(mlp, dump_onnx=args.dump_onnx)
model = L.Classifier(mlp)
model.to_device(device)
device.use()
Expand Down

0 comments on commit 9fe3111

Please sign in to comment.