Skip to content

Instantly share code, notes, and snippets.

@marty1885
Created May 23, 2018 00:33
Show Gist options
  • Save marty1885/60c5013865444fc8ed79fadb1ef05642 to your computer and use it in GitHub Desktop.
Save marty1885/60c5013865444fc8ed79fadb1ef05642 to your computer and use it in GitHub Desktop.
network<sequential> net;
net << conv(64, 64, 5, 1, 6) << leaky_relu() // in: 64x64x1, out 6 chanels, kernel size: 5
<< max_pool(60, 60, 6, 2) // in: 60x60x6, 2x2 pooling
<< conv(30, 30, 5, 6, 9) << leaky_relu() // in: 30x30x6, out 9 channels, kernel size: 5
<< max_pool(26, 26, 9, 2) // in:26x26x9, 2x2 pooling
<< conv(13, 13, 6, 9, 12) << leaky_relu()// in: 13x13x9, out 12 channels, kernel size: 6
<< fc(8*8*12, 10)
<< softmax();
adam optimizer;
net.train<mse>(optimizer, x, y, BATCH_SIZE, NUM_BATCHES
,onEnumerateMinibatch, onEnumerateEpoch);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment