This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New callback interface for training visualization.
Neural style transfer notebook example of (refactored) live notebook charting. Trivial notebook to run train_cifar10 working. notebook structure in place for live charting. Needs module cb change. Module callbacks almost working. Epoch numbers NaN Module / CNN example for notebook charts. CIFAR10 training notebook for module works again. Matching callback code to notebook. Add new notebook Small fix Change notebook name Clean merge Small bug fix Import cleaning Update with master Point submodule to newest Clean import statement for notebook Fix callback function error Seperate doc Fix pylint
- Loading branch information
Leo Dirac
authored and
Wang
committed
Nov 22, 2016
1 parent
2cf3b74
commit 9cd7193
Showing
16 changed files
with
2,148 additions
and
588 deletions.
There are no files selected for viewing
Submodule dmlc-core
updated
17 files
+4 −0 | CMakeLists.txt | |
+9 −1 | Makefile | |
+2 −1 | include/dmlc/any.h | |
+11 −3 | include/dmlc/base.h | |
+167 −0 | include/dmlc/input_split_shuffle.h | |
+2 −0 | include/dmlc/io.h | |
+2 −1 | include/dmlc/json.h | |
+738 −0 | include/dmlc/lua.h | |
+27 −10 | include/dmlc/parameter.h | |
+37 −9 | include/dmlc/registry.h | |
+9 −9 | scripts/packages.mk | |
+3 −0 | src/io/cached_input_split.h | |
+3 −0 | src/io/input_split_base.h | |
+5 −0 | src/io/local_filesys.cc | |
+10 −0 | src/io/single_file_split.h | |
+4 −2 | src/io/uri_spec.h | |
+2 −9 | test/parameter_test.cc |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
""" | ||
LeCun, Yann, Leon Bottou, Yoshua Bengio, and Patrick | ||
Haffner. "Gradient-based learning applied to document recognition." | ||
Proceedings of the IEEE (1998) | ||
""" | ||
import mxnet as mx | ||
|
||
def get_symbol(num_classes = 1000, add_stn=False): | ||
data = mx.symbol.Variable('data') | ||
if(add_stn): | ||
data = mx.sym.SpatialTransformer(data=data, loc=get_loc(data), target_shape = (28,28), | ||
transform_type="affine", sampler_type="bilinear") | ||
# first conv | ||
conv1 = mx.symbol.Convolution(data=data, kernel=(5,5), num_filter=20) | ||
tanh1 = mx.symbol.Activation(data=conv1, act_type="tanh") | ||
pool1 = mx.symbol.Pooling(data=tanh1, pool_type="max", | ||
kernel=(2,2), stride=(2,2)) | ||
# second conv | ||
conv2 = mx.symbol.Convolution(data=pool1, kernel=(5,5), num_filter=50) | ||
tanh2 = mx.symbol.Activation(data=conv2, act_type="tanh") | ||
pool2 = mx.symbol.Pooling(data=tanh2, pool_type="max", | ||
kernel=(2,2), stride=(2,2)) | ||
# first fullc | ||
flatten = mx.symbol.Flatten(data=pool2) | ||
fc1 = mx.symbol.FullyConnected(data=flatten, num_hidden=500) | ||
tanh3 = mx.symbol.Activation(data=fc1, act_type="tanh") | ||
# second fullc | ||
fc2 = mx.symbol.FullyConnected(data=tanh3, num_hidden=num_classes) | ||
# loss | ||
lenet = mx.symbol.SoftmaxOutput(data=fc2, name='softmax') | ||
return lenet |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
Oops, something went wrong.