Export the weights according origin model and sub model config.
Parameters:
origin_model(paddle.nn.Layer): the instance of original model.
config(dict): the config of sub model, can get by OFA.get_current_config() or some special config, such as paddleslim.nas.ofa.utils.dynabert_config(width_mult).
input_shapes(list|list(list)): the shape of all inputs.
input_dtypes(list): the dtype of all inputs.
load_weights_from_supernet(bool, optional): whether to load weights from SuperNet. Default: False.