def transforms(item, cfg, mode):
    '\n    :param item: sample = deepcopy(self.items[index])\n    :param cfg: cfg\n    :return:\n\n    eval() transform str to list, dict, tuple. Here is a series of the transform methods in turn.\n    '
    transforms_dataset_factory = {'train': cfg.dataset.train, 'test': cfg.dataset.test}
    if (transforms_dataset_factory[mode].before_to_tensor_transform_list is not None):
        for t in transforms_dataset_factory[mode].before_to_tensor_transform_list:
            item = eval('{}(item, cfg)'.format(t))
    item = to_tensor(item, cfg)
    if (transforms_dataset_factory[mode].after_to_tensor_transform_list is not None):
        for t in transforms_dataset_factory[mode].after_to_tensor_transform_list:
            item = eval('{}(item, cfg)'.format(t))
    return item
:param item: sample = deepcopy(self.items[index])
:param cfg: cfg
:return:

eval() transform str to list, dict, tuple. Here is a series of the transform methods in turn.
def transforms(item, cfg, mode):
    '\n    :param item: sample = deepcopy(self.items[index])\n    :param cfg: cfg\n    :return:\n\n    eval() transform str to list, dict, tuple. Here is a series of the transform methods in turn.\n    '
    transforms_dataset_factory = {'train': cfg.dataset.train, 'test': cfg.dataset.test}
    if (transforms_dataset_factory[mode].before_to_tensor_transform_list is not None):
        for t in transforms_dataset_factory[mode].before_to_tensor_transform_list:
            item = eval('{}(item, cfg)'.format(t))
    item = to_tensor(item, cfg)
    if (transforms_dataset_factory[mode].after_to_tensor_transform_list is not None):
        for t in transforms_dataset_factory[mode].after_to_tensor_transform_list:
            item = eval('{}(item, cfg)'.format(t))
    return item