Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

03 image classification #5192

Merged
merged 10 commits into from
Oct 29, 2017

Conversation

jacquesqiao
Copy link
Member

@jacquesqiao jacquesqiao commented Oct 29, 2017

project: #4531
issue: #5100

  • batch_norm_layer
  • reshape_layer
  • img_conv_group
  • vgg16_bn_drop network
  • train_file
  • CPU && GPU train
  • loss reduce
  • resnet network

@@ -130,7 +130,10 @@ class Tensor {
return holder_->place();
}

std::type_index type() const { return holder_->type(); }
std::type_index type() const {
PADDLE_ENFORCE_NOT_NULL(holder_, "Tensor get type() must contains holder");
Copy link
Collaborator

Choose a reason for hiding this comment

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

"Tensor get type() must contains holder"

==>

"Tensor not initialized yet when Tensor::type() is called."

@@ -64,6 +65,9 @@ class BatchNormOp : public framework::OperatorWithKernel {
(tensor_format == TensorFormat::NCHW ? x_dims[1]
: x_dims[x_dims.size() - 1]);

PADDLE_ENFORCE(x_dims.size() >= 3 && x_dims.size() <= 5,
"input x dims should be between 3 and 5, actual");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Input x must have 3 to 5 dimensions.

@@ -86,6 +86,7 @@
fetch_list=[avg_cost])

loss = np.array(outs[0])
print(loss)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we remove or comment out this line?

Copy link
Collaborator

@wangkuiyi wangkuiyi left a comment

Choose a reason for hiding this comment

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

LGTM

@jacquesqiao jacquesqiao merged commit 0049ce0 into PaddlePaddle:develop Oct 29, 2017
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.

2 participants