Comments (5)
from ccnet-pure-pytorch.
x和x_dsn被分别求loss,然后对各自的loss加权求和得到最后的loss,所以不应该cat
from ccnet-pure-pytorch.
感谢回复,如果我只想在我的程序中使用CCNet网络,例如输入:[4,3,320,320],然后输出为[4,4,320,320],分割为4类,是不是应该修改网络forward代码:最后使用上采样得到输出? @Serge-weihao
from ccnet-pure-pytorch.
您好,我这样修改ccnet.py的forward代码,不分别求loss,对x_dsn和x进行融合,然后进行分割,只对这一个结果与label求loss,可以吗?
def forward(self, x, labels=None):
#print(111)
size = (x.shape[2], x.shape[3])
x = self.relu1(self.bn1(self.conv1(x)))
x = self.relu2(self.bn2(self.conv2(x)))
x = self.relu3(self.bn3(self.conv3(x)))
x = self.maxpool(x)
x = self.layer1(x)
x = self.layer2(x)
#print(222)
x = self.layer3(x)
#print(333)
x_dsn = self.dsn(x)
#print(x_dsn.shape)
x = self.layer4(x)
#print(x.shape)
x = self.head(x, self.recurrence)
#print(x.shape)
outs = torch.cat([x, x_dsn],1)
print(outs.shape)
outs = self.conv4(outs)
outs = nn.Upsample(size, mode='bilinear', align_corners=True)(outs)
#print(outs)
return outs
from ccnet-pure-pytorch.
deeplabv3plus就是类似的结构,不同level concat起来,你觉得合适就行
from ccnet-pure-pytorch.
Related Issues (20)
- Calculating loss HOT 2
- Not an issue - question on maths / paper / relation to this line HOT 1
- padding error
- inplace_abn usage HOT 2
- 将Pure-Pytorch的RCCA模块应用到视频任务中loss没有完全收敛 HOT 1
- confusion in OhemCrossEntropy loss function HOT 1
- Num classes
- Can you offer the scores you got by the net? HOT 1
- 关于类别一致损失CCL
- About 3d version HOT 2
- Segmentation fault (core dumped) HOT 7
- About 3D CC Attention module
- 为什么CCNet输入和输出总是一样的呢? HOT 2
- 关于评估代码与原始代码有些不同,请大佬帮忙解释一下疑惑? HOT 1
- why self.gamma =0? HOT 1
- about_CC.py HOT 3
- rcca compile error HOT 8
- Apex error HOT 1
- can this work with cuda toolkit 11.2 + for nvidia 3090 ? HOT 4
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 ccnet-pure-pytorch.