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

Update the ResNet model for TensorFlow. #36

Merged
merged 5 commits into from
Jan 5, 2018

Conversation

qingqing01
Copy link
Collaborator

@qingqing01 qingqing01 commented Dec 27, 2017

Fix #28

@@ -117,6 +121,7 @@ def conv2d_fixed_padding(inputs, filters, kernel_size, strides, data_format):
"""Strided 2-D convolution with explicit padding."""
# The padding is consistent and is based only on `kernel_size`, not on the
# dimensions of `inputs` (as opposed to using `tf.layers.conv2d` alone).
# This is consistent with PaddlePaddle.
Copy link
Collaborator

Choose a reason for hiding this comment

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

我觉这里可以tf计算output_size的代码贴上去,方便更好的了解这样做的原因 https://github.com/tensorflow/tensorflow/blob/f5f2f789ea395e585ddcbc43e088fa63d6b41d0e/tensorflow/core/framework/common_shape_fns.cc#L20

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

print(
"Pass = %d, Train performance = %f imgs/s, Test accuracy = %f\n"
%
(pass_id, num_samples / train_elapsed, np.mean(test_accs)))
Copy link
Collaborator

Choose a reason for hiding this comment

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

test这一块写成一个函数是不是更合适些, for pass_id in range(args.pass_num):这个循环体显得很长

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

@chengduoZH
Copy link
Collaborator

LGTM++

@qingqing01 qingqing01 merged commit 93babe9 into dzhwinter:master Jan 5, 2018
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.

None yet

2 participants