Comments (5)
index 2 is "[return grad_weight, grad_alpha, None, None, None, grad_beta] " None, it correspond to the "[weight, alpha, g, Qn, Qp, beta]" g, g have no gradient and it gradient should be None.
from lsqplus.
It is the answer about backward. RuntimeError: function ALSQPlusBackward returned a gradient different than None at position
from lsqplus.
index 2 is "[return grad_weight, grad_alpha, None, None, None, grad_beta] " None, it correspond to the "[weight, alpha, g, Qn, Qp, beta]" g, g have no gradient and it gradient should be None.
Yes, I used the code from your repo , and it shows that the func of ALSQPlus have the "return grad_weight, grad_alpha, None, None, None, grad_beta" originally.
from lsqplus.
Hi author, thank you for your great work! I meet a problem when using Lsq+_V2:
Traceback (most recent call last): File "train.py", line 273, in <module> train(args) File "train.py", line 201, in train scaler.scale(loss).backward() File "/home/work/ssd1/anaconda3/envs/py38/lib/python3.8/site-packages/torch/_tensor.py", line 396, in backward torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs) File "/home/work/ssd1/anaconda3/envs/py38/lib/python3.8/site-packages/torch/autograd/__init__.py", line 173, in backward Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass RuntimeError: Function ALSQPlusBackward returned an invalid gradient at index 2 - got [1] but expected shape compatible with [0]
It seems that the backward func of ALSQPlus has some errors, any advice of how to solve this problem? Thanks in advance!
Hi lulululichuan, have you solved this problem?
from lsqplus.
多卡会有这个问题,单卡不会
It occurs when training with multi GPUs and is OK with single GPU
from lsqplus.
Related Issues (16)
- 关于scale参数是否学习的问题 HOT 2
- how to export S/Z files? HOT 2
- Questions about step size training in LSQ and LSQ+.
- I have a question about LSQ , LSQ+ model device embedding
- LSQ+ V2 per_channel模式效果很差 HOT 2
- 感谢分析!有个关于模型大小的问题请教
- batch_init初始化代码有误
- What's the function about the variable 'self.g' in lsqplus_quantiza_V1.py HOT 1
- Question about your code HOT 2
- 感谢分享,遇到一个小问题 HOT 3
- 这里有个问题.. HOT 1
- evaluate.py文件中有一个问题 HOT 5
- DDP training is failed HOT 1
- LSQplus 论文初始化方法实现的疑问 HOT 3
- 感谢分享,有个小问题想咨询 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 lsqplus.