Issues with FNet
See original GitHub issueThis is a tracking issue for problems/enhancements needed with FNet.
So far, @stefan-it @ontocord have mentioned that:
-
--fp16
precision throws an error with the model. -
It is not possible to keep variable sequence length during training because of the way DFT matrices are initialized (via a config variable).
- For this @ontocord suggested that we keep different buffers ready. A major drawback to this is that we can’t possibly keep dft matrices for all sequence lengths. However, the values of the DFT matrices vary according to the total sequence length expected.
- So, one efficient way of handling this is that we can try to create a generic matrix (not DFT) and then modify it on the fly accordingly based on the sequence length.
- For example, the DFT matrix is defined as:
- We can create a matrix without the multiplier, and then on the fly take the portion of the matrix that is needed for the batch, and then multiply with the correct multiplier. Wdyt @patrickvonplaten @sgugger?
- Or multiply the matrix with
sqrt(N)/sqrt(seq_length)
and takemat[:seq_length, :seq_length]
while multiplying.
- For example, the DFT matrix is defined as:
-
Need to verify if pushing to GPU pushes everything to the device (including buffers).
I will be adding more issues/problems here as and when they arise.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Solving F net = m•a Problems - The Physics Classroom
First you need to know how Fnetrelates to individual force values. The net force is the combined effect of all individual forces. It...
Read more >Net Force Problems Revisited - The Physics Classroom
If an object is being dragged across a horizontal surface, then there is no vertical acceleration. For this reason, the normal force (Fnorm)...
Read more >Solving Fnet = m•a Problems - Video - The Physics Classroom
Solving F=m•a problems can be difficult. But give Mr. H 5 minutes of your time and you will approach them with confidence and...
Read more >F=ma Practice Problems - StickMan Physics
Practice solving for net force, using Newtons second law (F=ma), and relating F=ma to the acceleration equations.
Read more >Fnet=ma Problems | Wyzant Ask An Expert
Fnet =ma Problems. 1) a 500 kg car is travelling at 15 m/s and experiences a forward engine force of 2000N for 3...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Should we implement a buffer solution here? @gchhablani - do you think this makes sense? How big would the buffer be in terms of size?
I think if PyTorch doesn’t support --fp16 for the fourier transform, we sadly can’t do much here. Regarding the second point, I think keeping a buffer would indeed be a good solution here!