MCPcopy Create free account
hub / github.com/BVLC/caffe / collect_bottoms

Function collect_bottoms

python/caffe/coord_map.py:126–137  ·  view source on GitHub ↗

Collect the bottoms to walk for the coordinate mapping. The general rule is that all the bottoms of a layer can be mapped, as most layers have the same coordinate mapping for each bottom. Crop layer is a notable exception. Only the first/cropped bottom is map

(top)

Source from the content-addressed store, hash-verified

124 # For now use a brute-force algorithm.
125
126 def collect_bottoms(top):
127 """
128 Collect the bottoms to walk for the coordinate mapping.
129 The general rule is that all the bottoms of a layer can be mapped, as
130 most layers have the same coordinate mapping for each bottom.
131 Crop layer is a notable exception. Only the first/cropped bottom is
132 mappable; the second/dimensions bottom is excluded from the walk.
133 """
134 bottoms = top.fn.inputs
135 if top.fn.type_name == 'Crop':
136 bottoms = bottoms[:1]
137 return bottoms
138
139 # walk back from top_from, keeping the coord map as we go
140 from_maps = {top_from: (None, 1, 0)}

Callers 1

coord_map_from_toFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected