EIDOSLAB / EIDOSLAB/simplify

Supporting non-vision models

未关闭
#18 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
36
派生
3
PR 合并指标
30 天内没有已合并 PR

描述

Hi,
could you explain how to use this for non-vision models?
Trying to apply this to an audio model I am getting an error because `get_previous_layer` never finds a `Conv2d` or a `BatchNorm2d` and hence, after recursing through all the modules, just returns None, which then fails at `re.sub`.

Could you explain the logic behind "going back to the previous layer of exactly this type"?

the immediate earlier layers are: (add, causing the search) -> [transpose] -> gelu -> transpose -> layer_norm -> transpose -> conv1d -> ...

which layer would you expect to find here? Are you looking for the last layer that learns anything (which would be layer norm) or with actual learnable parameters (then it's conv1d)

---

there is a second case where this happens where the chain is: (add, causing the search) -> [dropout] -> linear -> layer_norm -> transpose -> gelu -> transpose -> layer_norm -> transpose -> conv1d -> ...

again, please help me out which layer should be found. I would guess the linear layer?

---

on a side note: instead of deep recursion, checking the whole list each time, building a tree or doubly-linked-list-like structure seems more appropriate (and easier to debug)

贡献指南

这个仓库没有索引到贡献指南

调研方向

首先跟踪 get_previous_layer,直到调用接收 None 的 re.sub,然后将其对 Conv2d/BatchNorm2d 的假设与报告中的 Conv1d、Linear、LayerNorm、GELU、transpose、dropout 和 add 链进行比较。完成的标准是记录非视觉模型应选择哪个前置层,并定义找不到受支持层时的行为。

由索引模型根据 Issue 内容生成。

评估

技术栈
python, pytorch
领域
machine-learning
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。