Closed banasraf closed 1 year ago
CI MESSAGE: [6367079]: BUILD STARTED
CI MESSAGE: [6367079]: BUILD FAILED
CI MESSAGE: [6375878]: BUILD STARTED
CI MESSAGE: [6375878]: BUILD FAILED
How about changing the name of the feature? I feel that something around join
fits more, than split
. For example:
[ (2, 480, 640, 3), (3, 480, 640, 3)] --> [ (5, 480, 640, 3) ]
, then what we in fact do is to join the samples along outer-most dimension.[ (5, 480, 640, 3) ] --> [ (2, 480, 640, 3), (3, 480, 640, 3)]
, we split the batch of samples along outer-most dim.Looking into numpy
API, np.concatenate
looks like something we do here: https://numpy.org/doc/stable/reference/generated/numpy.concatenate.html. There's also np.flatten
, although it has this specific meaning, that it flattens always to 1-D array.
So how about naming this is the flavour of concatenate? E.g. cat_outer_dims
or concat_outer_dims
? I'd vote for the former, but it's just a personal preference, concat
is also totally fine.
CI MESSAGE: [6413229]: BUILD STARTED
CI MESSAGE: [6413229]: BUILD FAILED
CI MESSAGE: [6413700]: BUILD STARTED
CI MESSAGE: [6413700]: BUILD FAILED
CI MESSAGE: [6426023]: BUILD STARTED
CI MESSAGE: [6427306]: BUILD STARTED
CI MESSAGE: [6428145]: BUILD STARTED
CI MESSAGE: [6428145]: BUILD FAILED
CI MESSAGE: [6428720]: BUILD STARTED
CI MESSAGE: [6429057]: BUILD STARTED
CI MESSAGE: [6427306]: BUILD FAILED
CI MESSAGE: [6428720]: BUILD FAILED
CI MESSAGE: [6429057]: BUILD FAILED
CI MESSAGE: [6440460]: BUILD STARTED
CI MESSAGE: [6440460]: BUILD PASSED
CI MESSAGE: [6442331]: BUILD STARTED
CI MESSAGE: [6442398]: BUILD STARTED
CI MESSAGE: [6442398]: BUILD PASSED
CI MESSAGE: [6557874]: BUILD STARTED
CI MESSAGE: [6557874]: BUILD FAILED
CI MESSAGE: [6557874]: BUILD PASSED
Signed-off-by: Rafal rbanas@nvidia.com
This PR adds support for a new parameter to DALI backend. The parameter is "split_outer_dim" and it lets split output of DALI pipeline along the outer axis. So if the output is a batch of 2 samples of shapes:
will be reshaped to a batch of 5 samples:
This can be used to split sequences into sub-sequences (in cooperation with
reshape
operator`) or to split sequences into batch of images.The usage looks like this in config file:
Implementation required to changes:
dali_model_instance.cc
the actual reshaping takes place, for inputs that are specified in the config parameterdali_model.cc
, in the config validation/auto-fill part, the specified dimensionality is adjusted for outputs that are split.