Skip to content

Support of fastai based models #150

Answered by chr5tphr
oz-mishli asked this question in Q&A
Discussion options

You must be logged in to vote

Hey Oz,

although I have never used fastai before, it seems like all their layers are based on torch.nn.Module, and layers like fastai.layers.ConvLayer seem to inherit from torch.nn.Conv2d, so they should work fine with Zennit.
There are, however, a few points to keep in mind:

  • If your model has (non-native PyTorch) custom layers, by default, their gradient will be used. If the gradient is not the correct/ an applicable/ desirable way to attribute the layer, you need to specify a rule for your layer type. To do this, you can specify your own Composite as described here. There is also a new feature coming in the next release, which you can get by installing the dev-version with `pip install…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@oz-mishli
Comment options

@chr5tphr
Comment options

@oz-mishli
Comment options

@oz-mishli
Comment options

@chr5tphr
Comment options

Answer selected by oz-mishli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants