Commit 25a85c27 authored by eyuhar's avatar eyuhar

adjust parameters for mnist dataset

parent f11a1b91
Pipeline #122336 failed with stage
in 30 minutes and 36 seconds
......@@ -31,11 +31,11 @@ int main(int argc, char* argv[]) {
std::cout << "== original image size: " << img.size() << " ==" << std::endl;
// scale image to fit
cv::Size scale(32,32);
cv::Size scale(28,28);
cv::resize(img, img, scale);
std::cout << "== simply resize: " << img.size() << " ==" << std::endl;
size_t channels = 3;
size_t channels = 1;
size_t height = img.rows;
size_t width = img.cols;
vector<float> data(channels*height*width);
......
configuration Network{
num_epoch:10
batch_size:100
normalize:true
num_epoch:5
batch_size:10
normalize:false
context:cpu
load_checkpoint:false
optimizer:sgd{
learning_rate:0.2
learning_rate:0.1
learning_rate_decay:0.85
step_size:1000
weight_decay:0.0
......
package cNNCalculator;
component Network<Z(2:oo) classes = 10>{
ports in Z(0:255)^{3, 32, 32} data,
ports in Z(0:255)^{1, 28, 28} data,
out Q(0:1)^{classes} softmax;
implementation CNN {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment