Comments (6)
谢谢您的帮助,通过多次调试,发现是我的代码在加载模型参数时的异常导致的错误,已经解决了,不好意思,耽误您的时间了!
祝您科研顺利,工作愉快!
from libmtl.
- nn.CrossEntropyLoss()和nn.KLDivLoss()对target/gt的维度要求是不同的,比如model输出的prediction的维度是64x31,其中64是batch size的维度,那么nn.CrossEntropyLoss()的target的维度是64,而nn.KLDivLoss()的是64x31。具体可以参考pytorch官方文档中关于nn.CrossEntropyLoss()和nn.KLDivLoss()的说明和例子。
- 从你提供的信息中,我没找到bug在哪==。
from libmtl.
我换过几个损失函数的计算方式,都显示在DWA loss.backward()的时候,说在进行反向传播时[512,31]这个向量里面有值发生了inplace操作,但是我并没有在损失函数中有类似+=或者类似的inplace操作
from libmtl.
“[512,31]这个向量”, 这个向量是哪个
from libmtl.
decoder定义为linear,在office-31数据集中,就是把512维的向量映射到31个类别中,所以相当于给encoder的输出结果乘以[512,31]的矩阵向量。
模型在反向传播时,对这个矩阵向量的权值进行更新
from libmtl.
单靠这样的描述很难找到bug,如果方便还是麻烦你提供一下可复现这个bug的代码吧
from libmtl.
Related Issues (20)
- Questions about AlignMTL HOT 4
- When running the example code for QM9, the program seems to enter an infinite loop. QM9案例训练代码无响应
- When running the example code for QM9, the program seems to enter an infinite loop. QM9案例训练代码无响应 HOT 8
- Identical result for CAGrad and MoCo HOT 11
- Question about AlignedMTL HOT 2
- 关于rep_grads参数的问题 HOT 5
- 关于tabular数据的训练问题 HOT 4
- Not found the script for testing in examples/* HOT 6
- Image size of NYUv2 dataset should be 3*288*384 HOT 3
- Error while "from torchvision.models.utils import load_state_dict_from_url" HOT 3
- How to implement MTL scenario when each sample has some of the labels available and not for all the tasks. HOT 1
- GradNorm求梯度 HOT 5
- Inconsistency between formula and implementation in count_improvement function HOT 2
- It seems that some functions are not compatible with the latest pytorch HOT 1
- 关于abstract_weighting.py中get_share_params的问题 HOT 2
- MMOE - Replicate the Original paper Chapter 3.2 (Synthetic Data) HOT 1
- Question about my understanding of aligned-MTL HOT 6
- Distributed DataParallel support HOT 2
- AttributeError: 'Net' object has no attribute 'conv1' HOT 2
- Aligned-MTL-UB Efficient version HOT 2
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 libmtl.