Last active
April 11, 2019 05:48
-
-
Save sadimanna/17fc631fcb905a30c4953e03d64805c4 to your computer and use it in GitHub Desktop.
Inception Resnet C block
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 incresC(x,scale,name=None): | |
| pad = 'same' | |
| branch0 = conv2d(x,192,1,1,pad,True,name=name+'b0') | |
| branch1 = conv2d(x,192,1,1,pad,True,name=name+'b1_1') | |
| branch1 = conv2d(branch1,224,[1,3],1,pad,True,name=name+'b1_2') | |
| branch1 = conv2d(branch1,256,[3,1],1,pad,True,name=name+'b1_3') | |
| branches = [branch0,branch1] | |
| mixed = Concatenate(axis=3, name=name + '_mixed')(branches) | |
| filt_exp_1x1 = conv2d(mixed,2048,1,1,pad,False,name=name+'fin1x1') | |
| final_lay = Lambda(lambda inputs, scale: inputs[0] + inputs[1] * scale, | |
| output_shape=backend.int_shape(x)[1:], | |
| arguments={'scale': scale}, | |
| name=name+'act_saling')([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