Class ov::pass::MimicSetBatchSize

class MimicSetBatchSize : public ov::pass::ModelPass

MimicSetBatchSize transformation relaxes hard-coded output batch dimension of Reshape operation. For Reshape with input shape [in_batch, …] and pattern value [out_batch, …] it generates a sub-graph which basically keeps ratio of input and output batch size and performs the following calculation:

scale = float(out_batch) / float(in_batch) modified_batch_dim = int(ceil(float(shape(input)[0]) * scale))

This transformation should be executed only while setBatchSize method call