EIDOSLAB / EIDOSLAB/simplify

Supporting non-vision models

Ouverte
#18 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
36
Forks
3
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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)

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Commencez par suivre get_previous_layer jusqu'à l'appel à re.sub qui reçoit None, puis comparez ses hypothèses concernant Conv2d/BatchNorm2d avec les chaînes signalées de Conv1d, Linear, LayerNorm, GELU, transpose, dropout et add. Le travail est terminé lorsque la documentation précise quel prédécesseur doit être sélectionné pour les modèles non visuels et que le comportement est défini lorsqu'aucune couche prise en charge n'est trouvée.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python, pytorch
Domaine
machine-learning
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.