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

Function crop_params

python/caffe/coord_map.py:40–47  ·  view source on GitHub ↗

Extract the crop layer parameters with defaults.

(fn)

Source from the content-addressed store, hash-verified

38
39
40def crop_params(fn):
41 """
42 Extract the crop layer parameters with defaults.
43 """
44 params = fn.params.get('crop_param', fn.params)
45 axis = params.get('axis', 2) # default to spatial crop for N, C, H, W
46 offset = np.array(params.get('offset', 0), ndmin=1)
47 return (axis, offset)
48
49
50class UndefinedMapException(Exception):

Callers 1

coord_mapFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected