-
Notifications
You must be signed in to change notification settings - Fork 14
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
Conversation
@@ -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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
tensorflow/resnet.py
Outdated
print( | ||
"Pass = %d, Train performance = %f imgs/s, Test accuracy = %f\n" | ||
% | ||
(pass_id, num_samples / train_elapsed, np.mean(test_accs))) |
There was a problem hiding this comment.
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):
这个循环体显得很长
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
LGTM++ |
Fix #28