Skip to content

Commit 699dab3

Browse files
committed
fix bug.
1 parent fb41c47 commit 699dab3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/mnist/mnist_train_test.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,8 @@ static std::shared_ptr<EasyCNN::DataBucket> loadImage(const std::vector<std::pai
386386
{
387387
const int number = samples.size();
388388
const int channel = 1;
389-
const int width = 20;
390-
const int height = 20;
389+
const int width = 28;
390+
const int height = 28;
391391
std::shared_ptr<EasyCNN::DataBucket> result(new EasyCNN::DataBucket(EasyCNN::DataSize(number, channel, width, height)));
392392
const size_t sizePerImage = channel*width*height;
393393
const float scaleRate = 1.0f / 255.0f;
@@ -472,7 +472,7 @@ static std::vector<std::pair<int, cv::Mat>> export_random_mnist_image(const std:
472472
int mnist_main(int argc, char* argv[])
473473
{
474474
const std::string model_file = "../../res/model/mnist_mlp.model";
475-
#if 1
475+
#if 0
476476
const std::string mnist_train_images_file = "../../res/mnist_data/train-images.idx3-ubyte";
477477
const std::string mnist_train_labels_file = "../../res/mnist_data/train-labels.idx1-ubyte";
478478
train(mnist_train_images_file, mnist_train_labels_file, model_file);

0 commit comments

Comments
 (0)