Open prashkmr opened 5 years ago
@prashant030591 this piece may seem strange and quite hard to understand. Actually, the whole 'route' block code can be replaced by the following
# here we need to deal only with the number of filters
elif x['type'] == 'route':
# route can have one, two, or more sources
# first, let's make them to be ints
routes = [int(route) for route in x['layers'].split(',')]
# then, sum the number of filters from at each mentioned layer
filters = sum([output_filters[route] for route in routes])
Note: it also helps to deal with a more general case when x['layers'] has more than 2 elements.
@ayooshkathuria it would be nice to have your comments as well. Do you need a PR on this subtle change?
Positive anotation
I am unable to understand what this means in the shortcut layer.