-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ModelInputWrapper class to feed inputs to pytorch modules for layer methods #534
Conversation
This pull request was exported from Phabricator. Differential Revision: D25110896 |
Summary: Pull Request resolved: pytorch#534 Introduces a utility class called `ModelInputWrapper` to wrap over a model in order to treat inputs as separate layers. This does so by mapping each input fed to `forward` using an `Identity` operation. This way if attribute_to_inputs=True or False it should work. Add two tests: - Test whether _foward_layer_eval retrieves the appropriate input values - Compare regular IG with layer IG and layer wrapped inputs Updated tutorial and documentation Differential Revision: D25110896 fbshipit-source-id: c46f1f720132edc674ccc12a2268ddb68b6d9af8
59168bd
to
6c889cd
Compare
This pull request was exported from Phabricator. Differential Revision: D25110896 |
Summary: Pull Request resolved: pytorch#534 Introduces a utility class called `ModelInputWrapper` to wrap over a model in order to treat inputs as separate layers. This does so by mapping each input fed to `forward` using an `Identity` operation. This way if attribute_to_inputs=True or False it should work. Add two tests: - Test whether _foward_layer_eval retrieves the appropriate input values - Compare regular IG with layer IG and layer wrapped inputs Updated tutorial and documentation Differential Revision: D25110896 fbshipit-source-id: cffb280e58f29725c5115c9088160bdeedf58ef3
6c889cd
to
bc9c9cb
Compare
This pull request was exported from Phabricator. Differential Revision: D25110896 |
1 similar comment
This pull request was exported from Phabricator. Differential Revision: D25110896 |
Summary: Pull Request resolved: pytorch#534 Introduces a utility class called `ModelInputWrapper` to wrap over a model in order to treat inputs as separate layers. This does so by mapping each input fed to `forward` using an `Identity` operation. This way if attribute_to_inputs=True or False it should work. Add two tests: - Test whether _foward_layer_eval retrieves the appropriate input values - Compare regular IG with layer IG and layer wrapped inputs Updated tutorial and documentation Differential Revision: D25110896 fbshipit-source-id: 1f640f0ad90f02829c1f7afdd1d6c167323ec92a
bc9c9cb
to
9ef7845
Compare
Summary: Pull Request resolved: pytorch#534 Introduces a utility class called `ModelInputWrapper` to wrap over a model in order to treat inputs as separate layers. This does so by mapping each input fed to `forward` using an `Identity` operation. This way if attribute_to_inputs=True or False it should work. Add two tests: - Test whether _foward_layer_eval retrieves the appropriate input values - Compare regular IG with layer IG and layer wrapped inputs Updated tutorial and documentation Differential Revision: D25110896 fbshipit-source-id: 7a28a719e1a403f507650d454272be2caba3624c
9ef7845
to
b199a66
Compare
This pull request was exported from Phabricator. Differential Revision: D25110896 |
Summary: Pull Request resolved: pytorch#534 Introduces a utility class called `ModelInputWrapper` to wrap over a model in order to treat inputs as separate layers. This does so by mapping each input fed to `forward` using an `Identity` operation. This way if attribute_to_inputs=True or False it should work. Add two tests: - Test whether _foward_layer_eval retrieves the appropriate input values - Compare regular IG with layer IG and layer wrapped inputs Updated tutorial and documentation Differential Revision: D25110896 fbshipit-source-id: 3976e3a9d2251523b8255a85e190916e8f5a6ca4
b199a66
to
27804a9
Compare
This pull request was exported from Phabricator. Differential Revision: D25110896 |
1 similar comment
This pull request was exported from Phabricator. Differential Revision: D25110896 |
Summary: Pull Request resolved: pytorch#534 Introduces a utility class called `ModelInputWrapper` to wrap over a model in order to treat inputs as separate layers. This does so by mapping each input fed to `forward` using an `Identity` operation. This way if attribute_to_inputs=True or False it should work. Add two tests: - Test whether _foward_layer_eval retrieves the appropriate input values - Compare regular IG with layer IG and layer wrapped inputs Updated tutorial and documentation Differential Revision: D25110896 fbshipit-source-id: c5e4d82895d26b302d55d1785f26ae3b194ae9d2
27804a9
to
2d4492f
Compare
Summary: Pull Request resolved: pytorch#534 Introduces a utility class called `ModelInputWrapper` to wrap over a model in order to treat inputs as separate layers. This does so by mapping each input fed to `forward` using an `Identity` operation. This way if attribute_to_inputs=True or False it should work. Add two tests: - Test whether _foward_layer_eval retrieves the appropriate input values - Compare regular IG with layer IG and layer wrapped inputs Updated tutorial and documentation Differential Revision: D25110896 fbshipit-source-id: 51ae4c2fda32f12d5c23bb0d278ed284b0288347
2d4492f
to
a7e59b4
Compare
Summary: Pull Request resolved: pytorch#534 Introduces a utility class called `ModelInputWrapper` to wrap over a model in order to treat inputs as separate layers. This does so by mapping each input fed to `forward` using an `Identity` operation. This way if attribute_to_inputs=True or False it should work. Add two tests: - Test whether _foward_layer_eval retrieves the appropriate input values - Compare regular IG with layer IG and layer wrapped inputs Updated tutorial and documentation Differential Revision: D25110896 fbshipit-source-id: 1744f083a0188b5dc54d93d2d210113b28acf233
a7e59b4
to
6de458c
Compare
Summary: Pull Request resolved: pytorch#534 Introduces a utility class called `ModelInputWrapper` to wrap over a model in order to treat inputs as separate layers. This does so by mapping each input fed to `forward` using an `Identity` operation. This way if attribute_to_inputs=True or False it should work. Add two tests: - Test whether _foward_layer_eval retrieves the appropriate input values - Compare regular IG with layer IG and layer wrapped inputs Updated tutorial and documentation Differential Revision: D25110896 fbshipit-source-id: 1d951bf06510aab85f83d4484ed8fabb724356c5
6de458c
to
4052a19
Compare
Summary: Pull Request resolved: pytorch#534 Introduces a utility class called `ModelInputWrapper` to wrap over a model in order to treat inputs as separate layers. This does so by mapping each input fed to `forward` using an `Identity` operation. This way if attribute_to_inputs=True or False it should work. Add two tests: - Test whether _foward_layer_eval retrieves the appropriate input values - Compare regular IG with layer IG and layer wrapped inputs Updated tutorial and documentation Differential Revision: D25110896 fbshipit-source-id: e71d520d5984b7d046ac5ab0b658d367398cf53b
4052a19
to
992887a
Compare
This pull request was exported from Phabricator. Differential Revision: D25110896 |
Summary: Pull Request resolved: pytorch#534 Introduces a utility class called `ModelInputWrapper` to wrap over a model in order to treat inputs as separate layers. This does so by mapping each input fed to `forward` using an `Identity` operation. This way if attribute_to_inputs=True or False it should work. Add two tests: - Test whether _foward_layer_eval retrieves the appropriate input values - Compare regular IG with layer IG and layer wrapped inputs Updated tutorial and documentation Reviewed By: NarineK Differential Revision: D25110896 fbshipit-source-id: 82b6a4c335904833089b6c0e731d4fdd716163a2
992887a
to
0c4f83c
Compare
This pull request was exported from Phabricator. Differential Revision: D25110896 |
This pull request has been merged in 174ecbd. |
Summary: Pull Request resolved: #534 Introduces a utility class called `ModelInputWrapper` to wrap over a model in order to treat inputs as separate layers. This does so by mapping each input fed to `forward` using an `Identity` operation. This way if attribute_to_inputs=True or False it should work. Add two tests: - Test whether _foward_layer_eval retrieves the appropriate input values - Compare regular IG with layer IG and layer wrapped inputs Updated tutorial and documentation Reviewed By: NarineK Differential Revision: D25110896 fbshipit-source-id: bb8dd4947ae88e183af94c09cf906f9687fbe8ff
Summary:
Introduces a utility class called
ModelInputWrapper
to wrap over a model in order to treat inputs as separate layers.This does so by mapping each input fed to
forward
using anIdentity
operation. This way if attribute_to_inputs=True or False it should work.Add two tests:
Differential Revision: D25110896