Skip to content

Conversation

@gangliao
Copy link
Contributor

No description provided.

图像分类教程
==========

在本教程中,我们将使用CIFAR-10数据集训练一个卷积神经网络,并使用这个神经网络来对图片进行分类。如下图所示,卷积神经网络可以辨识图片中的主体,并给出分类结果。
Copy link
Contributor Author

@gangliao gangliao Dec 23, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

忽略这两个文档文件。

predict = small_vgg(input_image=img, num_channels=3)
```
After writing the config, we can train the model by running the script train.sh. Notice that the following script assumes the you run the script in the `./demo/image_classification` folder. If you run the script in a different folder, you need to change the paths of the scripts and the configuration files accordingly.
After writing the config, we can train the model by running the script train.sh.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

忽略

/// to batch, channels* imagePixels.
void shrinkMat(const MatrixPtr& in, MatrixPtr& out);

void onPassEnd() { firstTest_ = true; }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

忽略

Copy link
Collaborator

@reyoung reyoung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Cool.

@reyoung reyoung merged commit 4ccd5ea into PaddlePaddle:develop Dec 27, 2016
/**
* Disable copy macro.
*/
#define DISABLE_COPY(class_name) \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

所以这个macro实际做的还是 DISABLE_COPY_AND_ASSIGN,只是希望有个短一点儿的名字?

Copy link
Contributor Author

@gangliao gangliao Dec 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wangkuiyi
paddle里面有冗余 有个地方叫做 DISABLE_COPY_AND_ASSIGN https://github.com/PaddlePaddle/Paddle/pull/1004/files/c8d0791accb7fbceda308756e6271e12e233c063#diff-115063b195553537162a362f6784ceb1L28

其他地方都用的是DISABLE_COPY这个头文件。
https://github.com/PaddlePaddle/Paddle/pull/1004/files/c8d0791accb7fbceda308756e6271e12e233c063#diff-af4f409b1f461e14cd371f23d15bb2feL20

DISABLE_COPY_AND_ASSIGN和DISABLE_COPY 都挺通用的。本质上都是copy。只是这里去掉DISABLE_COPY_AND_ASSIGN, 是因为改动影响更小

Copy link
Collaborator

@wangkuiyi wangkuiyi Dec 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK。明白了。

@gangliao gangliao deleted the common branch March 22, 2017 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants