Skip to content

Instantly share code, notes, and snippets.

@johnolafenwa
Last active April 22, 2018 18:08
Show Gist options
  • Save johnolafenwa/280fb55d3feaa34c71e7e33f2bc386c9 to your computer and use it in GitHub Desktop.
Save johnolafenwa/280fb55d3feaa34c71e7e33f2bc386c9 to your computer and use it in GitHub Desktop.
#A resnet block consisting of N number of resnet modules, first layer has is pooled.
def resnet_block(x,filters,num_layers,pool_first_layer=True):
for i in range(num_layers):
pool = False
if i == 0 and pool_first_layer: pool = True
x = resnet_module(x,filters=filters,pool=pool)
return x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment