Created
February 18, 2016 06:58
-
-
Save tambetm/2ff99e29d2654d7cb918 to your computer and use it in GitHub Desktop.
Multiplication test with DeepLearnToolbox
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
% clear workspace and add DeepLearnToolbox to search path | |
clear all; | |
addpath(genpath('DeepLearnToolbox')); | |
train_X = randn(10000,2); | |
train_y = prod(train_X,2); | |
val_X = randn(1000,2); | |
val_y = prod(val_X,2); | |
nn = nnsetup([2 1000 1]); | |
nn.learningRate = 0.001; | |
nn.scaling_learningRate = 0.99; | |
nn.momentum = 0.9; | |
nn.output = 'linear'; | |
opts.numepochs = 100; | |
opts.batchsize = 100; | |
opts.plot = 1; | |
nn = nntrain(nn, train_X, train_y, opts, val_X, val_y); | |
pred_y = nnpredict(nn, val_X); | |
disp(horzcat(val_y, pred_y)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment