-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Residual Net / ResNet in TL #196
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I am thinking about it as well~ BTW, I think this resnet example is clear than the one you read. n = Conv2d(256, (1,1), (1,1), act=None, W_init=w_init, b_init=None)(n)
n = BatchNorm2d(decay=0.9, act=tf.nn.relu, gamma_init=g_init)(n)
# res blocks
nn = Conv2d(256, (3,3), (1,1), act=None, W_init=w_init, b_init=None)(n)
nn = BatchNorm2d(decay=0.9, act=tf.nn.relu, gamma_init=g_init)(nn)
nn = Conv2d(256, (3,3), (1,1), act=None, W_init=w_init, b_init=None)(nn)
nn = BatchNorm2d(decay=0.9, act=None, gamma_init=g_init)(nn)
n = Elementwise(tf.add)([n, nn])
nn = Conv2d(256, (3,3), (1,1), act=None, W_init=w_init, b_init=None)(n)
nn = BatchNorm2d(decay=0.9, act=tf.nn.relu, gamma_init=g_init)(nn)
nn = Conv2d(256, (3,3), (1,1), act=None, W_init=w_init, b_init=None)(nn)
nn = BatchNorm2d(decay=0.9, act=None, gamma_init=g_init)(nn)
n = Elementwise(tf.add)([n, nn])
nn = Conv2d(256, (3,3), (1,1), act=None, W_init=w_init, b_init=None)(n)
nn = BatchNorm2d(decay=0.9, act=tf.nn.relu, gamma_init=g_init)(nn)
nn = Conv2d(256, (3,3), (1,1), act=None, W_init=w_init, b_init=None)(nn)
nn = BatchNorm2d(decay=0.9, act=None, gamma_init=g_init)(nn)
n = Elementwise(tf.add)([n, nn])
nn = Conv2d(256, (3,3), (1,1), act=None, W_init=w_init, b_init=None)(n)
nn = BatchNorm2d(decay=0.9, act=tf.nn.relu, gamma_init=g_init)(nn)
nn = Conv2d(256, (3,3), (1,1), act=None, W_init=w_init, b_init=None)(nn)
nn = BatchNorm2d(decay=0.9, act=None, gamma_init=g_init)(nn)
n = Elementwise(tf.add)([n, nn]) More info : |
Yes, that is nicely compact and clear, thanks! Maybe it is simpler to just add ResNet example (one that includes the downsampling and padding)? Off topic, but have you found that different ResNet block topologies are more suited to different types of data? |
Yes, I will summarise the examples. |
I have been successfully using the resnet example code here. It would be nice to have a more concise form.
What do you think about adding a ResNet layer type? Interface would be similar to Conv2D, with addition of some flags such as
type
- what topology (BN-C-R / C-BN-R etc), andsubsample
- do we subsample by 2, etc.The text was updated successfully, but these errors were encountered: