Comments (2)
Hi,
I assume you refer to the implementation here. As you can see, a gradient is returned both for the features and the attention.
Regarding the derivation, the logic is as follows:
dL/dθ = dL/dE[f] dE[f]/dθ
= dL/dE[f] (d(a f)/dθ)/a
= dL/dE[f] ( da/dθ f/a + df/dθ a/a)
= dL/dE[f] ( da/dθ f/a + df/dθ)
This means that the gradient wrt the features is as if we had no attention distribution and the gradient wrt to the attention distribution is scaled inversely proportional to the attention scores.
Let me know if this actually helped clarify the situation a bit.
Cheers,
Angelos
from attention-sampling.
Hi Angelos,
thanks a lot for your explanation. The concept is clear to me now 👍
from attention-sampling.
Related Issues (20)
- pip install runtime error: Couldn't compile and install ats.ops.extract_patches.libpatches HOT 4
- Unable to install on Macbook pro HOT 4
- It's not learning HOT 2
- Extracting weird patches HOT 6
- Batch size for all the experiments in the papaer HOT 2
- What is the role of "receptive field"? HOT 2
- RuntimeError: Couldn't compile and install ats.ops.extract_patches.libpatches HOT 4
- file not found HOT 2
- Allow use of a patch generator HOT 5
- Offsets for extracting patches HOT 4
- Why using random sampling during inference and not pick instead the X patches with maximum attention? HOT 1
- C++ versions less than C++11 are not supported
- Suggestion of Environment (OS, package version, etc.) HOT 1
- Validation Accuracy Does not Change HOT 1
- MNIST noise overlaps signal
- expected_with_replacement
- Installation document no longer available
- Segmentation fault (core dumped) HOT 2
- What's the softmax temperature? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from attention-sampling.