EIDOSLAB / EIDOSLAB/simplify

Supporting non-vision models

Đang mở
#18 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
36
Fork
3
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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)

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Bắt đầu bằng cách lần theo get_previous_layer đến lệnh gọi re.sub nhận None, sau đó so sánh các giả định của nó về Conv2d/BatchNorm2d với các chuỗi Conv1d, Linear, LayerNorm, GELU, transpose, dropout và add đã được báo cáo. Được xem là hoàn tất khi đã ghi lại predecessor nào cần được chọn cho các mô hình không phải mô hình thị giác và xác định hành vi khi không tìm thấy layer nào được hỗ trợ.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python, pytorch
Lĩnh vực
machine-learning
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.