MCPcopy Create free account
hub / github.com/NVIDIA/DALI / MakeTallFunc

Function MakeTallFunc

dali/test/python/operator_2/test_reshape.py:99–107  ·  view source on GitHub ↗
(relative, wildcard)

Source from the content-addressed store, hash-verified

97
98
99def MakeTallFunc(relative, wildcard):
100 def func(image):
101 if relative:
102 return np.array([-1 if wildcard else 2, 0.5, 1]).astype(np.float32)
103 else:
104 h, w, c = image.shape
105 return np.array([-1 if wildcard else 2 * h, w / 2, c]).astype(np.int32)
106
107 return func
108
109
110class ReshapeWithArgInput(Pipeline):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected