def get_dummy_dataloader(dataloader, target_shape):
data_iter = enumerate(dataloader)<EOL>_, data_batch = next(data_iter)<EOL>logging.debug('<STR_LIT>', target_shape)<EOL>while data_batch[<NUM_LIT:0>].shape != target_shape:<EOL><INDENT>logging.debug('<STR_LIT>', data_batch[<NUM_LIT:0>].shape)<EOL>_, data_batch = next(data_iter)<EOL><DEDENT>logging.debug('<STR_LIT>')<EOL>class DummyIter():<EOL><INDENT>def __init__(self, batch):<EOL><INDENT>self._batch = batch<EOL><DEDENT>def __iter__(self):<EOL><INDENT>while True:<EOL><INDENT>yield self._batch<EOL><DEDENT><DEDENT><DEDENT>return DummyIter(data_batch)<EOL>
Return a dummy data loader which returns a fixed data batch of target shape