Merged
Conversation
qingqing01
reviewed
Jan 8, 2018
Collaborator
qingqing01
left a comment
There was a problem hiding this comment.
fluid/resnet50.py I think this name is not good. This is a general config, not only for 50 layers.
| if args.data_format == 'NCHW': | ||
| data_shape = [3, 224, 224] | ||
| else: | ||
| data_shape = [224, 224, 3] |
Collaborator
There was a problem hiding this comment.
The network is different for 224 * 224 input and 32 * 32 input, please refer to https://github.com/dzhwinter/benchmark/blob/master/tensorflow/resnet50.py#L360
qingqing01
reviewed
Jan 9, 2018
fluid/resnet50.py
Outdated
| res_out = block_func(res_out, ch_out, 1) | ||
| return res_out | ||
|
|
||
| def resnet(input, class_dim, depth=50, data_format='NCHW'): |
Collaborator
There was a problem hiding this comment.
叫 resnet_imagenet,和TensorFlow里的配置对应吧 https://github.com/dzhwinter/benchmark/blob/master/tensorflow/resnet50.py#L220
pkuyym
reviewed
Jan 10, 2018
fluid/resnet50.py
Outdated
| print('------------------------------------------------') | ||
|
|
||
| def conv_bn_layer(input, ch_out, filter_size, stride, padding, act='relu'): | ||
| tmp = fluid.layers.conv2d( |
fluid/stacked_dynamic_lstm.py
Outdated
| input=word_idx, size=[dict_size, embedding_dim]) | ||
|
|
||
| sentence = fluid.layers.fc(input=sentence, size=200, act='tanh') | ||
| sentence = fluid.layers.fc(input=embedding, size=hidden_dim * 4, bias_attr=True) |
Owner
Author
There was a problem hiding this comment.
I thought there will be four cell inside DynamicRNN, so it should be multiplied with 4, fixed.
fluid/stacked_dynamic_lstm.py
Outdated
| label=fluid.layers.data( | ||
| name='label', shape=[1], dtype='int64')) | ||
| loss = fluid.layers.mean(x=loss) | ||
| lstm_out = fluid.layers.sequence_pool(input=rnn(), pool_type='max') |
Collaborator
There was a problem hiding this comment.
Please double check 'max' or 'last' here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix resnet, add fluid cifar dataset support