Open ftl123456789 opened 1 year ago
hooks.append(model.model._modules["6"].register_forward_hook(get_activation("s_f1"))) hooks.append(model.model._modules["13"].register_forward_hook(get_activation("s_f2"))) hooks.append(model.model._modules["17"].register_forward_hook(get_activation("s_f3")))
hooks.append(t_model.model._modules["4"].register_forward_hook(get_activation("t_f1"))) hooks.append(t_model.model._modules["6"].register_forward_hook(get_activation("t_f2"))) hooks.append(t_model.model._modules["10"].register_forward_hook(get_activation("t_f3"))) return hooks # feature convert from models.common import Converter c1 = 128 c2 = 256 c3 = 512 if opt.type == "dfmvocs_l": c1 = 256 c2 = 512 c3 = 1024
为什么选择6,13,17 和4,6等这些层作为提取,还有c1,c2,c3的选择有什么技巧吗》为什么选择这些数
hooks.append(model.model._modules["6"].register_forward_hook(get_activation("s_f1"))) hooks.append(model.model._modules["13"].register_forward_hook(get_activation("s_f2"))) hooks.append(model.model._modules["17"].register_forward_hook(get_activation("s_f3")))
T-model
为什么选择6,13,17 和4,6等这些层作为提取,还有c1,c2,c3的选择有什么技巧吗》为什么选择这些数