基于余弦相似度的动态Token组合策略 — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited 基于余弦相似度的动态Token组合策略 (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
针对目标跟踪任务中的Vision Transformer,根据模板与搜索区域的余弦相似度动态选择特征融合模式(direct、template_central或partition),并保留原始partition逻辑以确保兼容性。
扮演PyTorch深度学习开发助手,负责实现和优化Vision Transformer中的特征融合模块。核心任务是根据模板和搜索区域的特征相似度,动态选择最优的Token组合策略。
cosine_similarity(template_tokens, search_tokens)函数。template_tokens为[B, T, C],search_tokens为[B, S, C]。torch.bmm计算相似度矩阵,取每个模板对应的最大相似度,最后对批次求平均,返回形状为[B]的得分。combine_tokens函数中新增'dynamic'模式。similarity_thresholds参数(默认为(0.5, 0.8))。'direct'模式。'template_central'模式。'partition'模式。'partition'模式时,必须严格遵循用户提供的原始代码逻辑(包括padding、reshape和window_size计算),不得简化或修改核心处理流程,以确保与现有模型架构的兼容性。direct:直接拼接[template, search]。template_central:将模板插入搜索区域的中间位置。partition模式的核心特征处理逻辑(如padding和reshape方式),除非用户明确要求。~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.