MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / set_transpose

Method set_transpose

rtpose_wrapper/python/caffe/io.py:187–201  ·  view source on GitHub ↗

Set the input channel order for e.g. RGB to BGR conversion as needed for the reference ImageNet model. Parameters ---------- in_ : which input to assign this channel order order : the order to transpose the dimensions

(self, in_, order)

Source from the content-addressed store, hash-verified

185 return decaf_in
186
187 def set_transpose(self, in_, order):
188 """
189 Set the input channel order for e.g. RGB to BGR conversion
190 as needed for the reference ImageNet model.
191
192 Parameters
193 ----------
194 in_ : which input to assign this channel order
195 order : the order to transpose the dimensions
196 """
197 self.__check_input(in_)
198 if len(order) != len(self.inputs[in_]) - 1:
199 raise Exception('Transpose order needs to have the same number of '
200 'dimensions as the input.')
201 self.transpose[in_] = order
202
203 def set_channel_swap(self, in_, order):
204 """

Callers 3

__init__Method · 0.80
__init__Method · 0.80
TYPED_TESTFunction · 0.80

Calls 1

__check_inputMethod · 0.95

Tested by 1

TYPED_TESTFunction · 0.64