Last active
April 11, 2019 05:47
-
-
Save sadimanna/6e33876d974a516304ce716b5b7df0de to your computer and use it in GitHub Desktop.
Inception ResNet B
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
| def incresB(x,scale,name=None): | |
| pad = 'same' | |
| branch0 = conv2d(x,192,1,1,pad,True,name=name+'b0') | |
| branch1 = conv2d(x,128,1,1,pad,True,name=name+'b1_1') | |
| branch1 = conv2d(branch1,160,[1,7],1,pad,True,name=name+'b1_2') | |
| branch1 = conv2d(branch1,192,[7,1],1,pad,True,name=name+'b1_3') | |
| branches = [branch0,branch1] | |
| mixed = Concatenate(axis=3, name=name + '_mixed')(branches) | |
| filt_exp_1x1 = conv2d(mixed,1152,1,1,pad,False,name=name+'filt_exp_1x1') | |
| final_lay = Lambda(lambda inputs, scale: inputs[0] + inputs[1] * scale, | |
| output_shape=backend.int_shape(x)[1:], | |
| arguments={'scale': scale}, | |
| name=name+'act_scaling')([x, filt_exp_1x1]) | |
| return final_lay |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment