Comments (15)
是不是ema.py文件
from dsl.
if not self.every_n_iters(runner, self.interval):
大佬好,我想知道every_n_iters是聚合教师的关键代码吗,但是我找不到位置
from dsl.
@lzx101 聚合教师请看这个issue
#7 (comment)
from dsl.
非常感谢您的回复,我还有一个疑问,EMAHook是原本的EMA吗,然后resnet_rla.py关于聚合教师的代码在哪一块呀?感谢大佬
from dsl.
@lzx101
[1]是的
[2]resnet_rla.py:
def _forward_impl(self, x):
from dsl.
感谢大佬,我再去细看一下
from dsl.
大佬你好,我有一个疑问,聚合教师的公式是这样的:xl+1=θl+1[xl + hl] + xl,hl+1=g2[g1[θl+1[xl + hl] + hl]。RLA_Bottleneck返回out, y, h。out是对应xl+1,y是对应xl,这个理解对吗
from dsl.
for layers, bns, conv_out, recurrent_conv in zip(self.stages, self.stage_bns, self.conv_outs, self.recurrent_convs):
for layer, bn in zip(layers, bns):
#返回三个输出 x残差表示残差块的输出特征,h是隐藏状态
x, y, h = layer(x, h)
# RLA module updates
#conv_out=g1
y_out = conv_out(y)
h = h + y_out
h = bn(h)
h = self.tanh(h)
h = recurrent_conv(h)
# outs.append(torch.cat((x, h), dim=1))
outs.append(x)
return tuple(outs)
还有就是最后返回的时候只使用了x,那么y和h的作用是什么呀
from dsl.
@lzx101
h 用于下一次的x计算
DSL/mmdet/models/backbones/resnet_rla.py
Line 305 in f06a411
from dsl.
@lzx101 h 用于下一次的x计算
DSL/mmdet/models/backbones/resnet_rla.py
Line 305 in f06a411
明白了,謝謝大佬
from dsl.
大佬,我想将聚合教师用于denseteacher(这是一个基于FCOS的半监督目标检测),只将模型的backbone改为resnet_rla.py,10/17 17:04:07 - mmengine - INFO - Iter(train) [ 5900/180000] lr: 2.5000e-03 eta: 1 day, 12:11:09 time: 0.7321 data_time: 0.0055 memory: 8939 loss: 1.9870 sup_loss_cls: 0.8551 sup_loss_bbox: 0.4710 sup_loss_centerness: 0.6610
10/17 17:04:43 - mmengine - INFO - Iter(train) [ 5950/180000] lr: 2.5000e-03 eta: 1 day, 12:10:04 time: 0.7296 data_time: 0.0055 memory: 8259 loss: 2.0174 sup_loss_cls: 0.8731 sup_loss_bbox: 0.4792 sup_loss_centerness: 0.6650
10/17 17:05:21 - mmengine - INFO - Exp name: rla_r50-caffe_fpn_gn_180k_semi-0.1-coco_20231017_153616
10/17 17:05:21 - mmengine - INFO - Iter(train) [ 6000/180000] lr: 2.5000e-03 eta: 1 day, 12:09:30 time: 0.7503 data_time: 0.0057 memory: 7672 loss: 2.0066 sup_loss_cls: 0.8717 sup_loss_bbox: 0.4733 sup_loss_centerness: 0.6615
10/17 17:05:57 - mmengine - INFO - Iter(train) [ 6050/180000] lr: 2.5000e-03 eta: 1 day, 12:08:19 time: 0.7243 data_time: 0.0055 memory: 8334 loss: 1.9943 sup_loss_cls: 0.8642 sup_loss_bbox: 0.4669 sup_loss_centerness: 0.6632
10/17 17:06:33 - mmengine - INFO - Iter(train) [ 6100/180000] lr: 2.5000e-03 eta: 1 day, 12:07:14 time: 0.7289 data_time: 0.0057 memory: 8661 loss: 1.9826 sup_loss_cls: 0.8393 sup_loss_bbox: 0.4815 sup_loss_centerness: 0.6618
10/17 17:07:10 - mmengine - INFO - Iter(train) [ 6150/180000] lr: 2.5000e-03 eta: 1 day, 12:06:28 time: 0.7417 data_time: 0.0062 memory: 8070 loss: 2.0134 sup_loss_cls: 0.8736 sup_loss_bbox: 0.4757 sup_loss_centerness: 0.6640
10/17 17:07:49 - mmengine - INFO - Iter(train) [ 6200/180000] lr: 2.5000e-03 eta: 1 day, 12:06:26 time: 0.7726 data_time: 0.0065 memory: 8546 loss: 1.9929 sup_loss_cls: 0.8551 sup_loss_bbox: 0.4741 sup_loss_centerness: 0.6636
但是我发现cls损失很高,然后结果不行。请问我还需要在哪里做改进吗
from dsl.
按照readme里
Download ImageNet pre-trained models for initializing DSL
需要下载并加载与训练的resnet_rla模型,不然训练太慢了
from dsl.
你好,我使用了下载并加载与训练的resnet_rla模型,但是效果还是很不好,我用的数据集是COCO2017,而不是DSL风格的COCO数据集,请问和这个有关系吗
10/18 20:56:45 - mmengine - INFO - Iter(train) [ 4700/180000] lr: 2.5000e-03 eta: 1 day, 11:59:11 time: 0.7001 data_time: 0.0056 memory: 8277 loss: 1.9277 sup_loss_cls: 0.8194 sup_loss_bbox: 0.4496 sup_loss_centerness: 0.6587
10/18 20:57:21 - mmengine - INFO - Iter(train) [ 4750/180000] lr: 2.5000e-03 eta: 1 day, 11:57:54 time: 0.7175 data_time: 0.0054 memory: 8058 loss: 1.9170 sup_loss_cls: 0.8234 sup_loss_bbox: 0.4358 sup_loss_centerness: 0.6578
10/18 20:57:58 - mmengine - INFO - Iter(train) [ 4800/180000] lr: 2.5000e-03 eta: 1 day, 11:57:11 time: 0.7357 data_time: 0.0057 memory: 7729 loss: 1.9380 sup_loss_cls: 0.8245 sup_loss_bbox: 0.4538 sup_loss_centerness: 0.6597
10/18 20:58:35 - mmengine - INFO - Iter(train) [ 4850/180000] lr: 2.5000e-03 eta: 1 day, 11:56:56 time: 0.7509 data_time: 0.0056 memory: 8169 loss: 1.9567 sup_loss_cls: 0.8332 sup_loss_bbox: 0.4615 sup_loss_centerness: 0.6621
10/18 20:59:12 - mmengine - INFO - Iter(train) [ 4900/180000] lr: 2.5000e-03 eta: 1 day, 11:56:01 time: 0.7287 data_time: 0.0055 memory: 8762 loss: 1.9467 sup_loss_cls: 0.8338 sup_loss_bbox: 0.4521 sup_loss_centerness: 0.6608
10/18 20:59:49 - mmengine - INFO - Iter(train) [ 4950/180000] lr: 2.5000e-03 eta: 1 day, 11:55:36 time: 0.7456 data_time: 0.0055 memory: 8337 loss: 1.9383 sup_loss_cls: 0.8332 sup_loss_bbox: 0.4441 sup_loss_centerness: 0.6609
10/18 21:00:26 - mmengine - INFO - Exp name: rla_r50-caffe_fpn_gn_180k_semi-0.1-coco_20231018_195807
10/18 21:00:26 - mmengine - INFO - Iter(train) [ 5000/180000] lr: 2.5000e-03 eta: 1 day, 11:54:51 time: 0.7339 data_time: 0.0057 memory: 7856 loss: 2.0013 sup_loss_cls: 0.8713 sup_loss_bbox: 0.4621 sup_loss_centerness: 0.6679
10/18 21:14:42 - mmengine - INFO - Iter(val) [5000/5000] teacher/coco/bbox_mAP: 0.0010 teacher/coco/bbox_mAP_50: 0.0010 teacher/coco/bbox_mAP_75: 0.0000 teacher/coco/bbox_mAP_s: 0.0000 teacher/coco/bbox_mAP_m: 0.0000 teacher/coco/bbox_mAP_l: 0.0010 student/coco/bbox_mAP: 0.0010 student/coco/bbox_mAP_50: 0.0010 student/coco/bbox_mAP_75: 0.0000 student/coco/bbox_mAP_s: 0.0010 student/coco/bbox_mAP_m: 0.0010 student/coco/bbox_mAP_l: 0.0010 data_time: 0.0095 time: 0.0852
from dsl.
@lzx101 用我的代码训练的话,需要转成dsl 风格的数据
from dsl.
好滴感谢大佬的回复,我再去研究一下
from dsl.
Related Issues (20)
- Question about dsl HOT 2
- Question about semi-supervised and supervised performance HOT 4
- EMAModel and student model get the same performance HOT 9
- How the scale invariant implement? HOT 4
- Where is "Adaptive Filtering Strategy" source code? HOT 1
- local variable 'save_path' referenced before assignment HOT 1
- some questions HOT 3
- 关于半监督训练的一些问题 HOT 2
- 关于lscale的一些问题 HOT 1
- 整数除以0报错 HOT 2
- unlabel_pred error and cannot find the images HOT 4
- 关于Aggregated Teacher
- RuntimeError: Address already in use HOT 7
- 我想请问一下为什么跑这个程序会直接卡死 HOT 14
- 监督学习 HOT 3
- 关于unlabel_train.sh HOT 2
- 伪标签好像没有及时更新? HOT 4
- 复现没达到预期 HOT 11
- 你好,想问一下关于patch shuffle的代码在哪里,找了好久没找到
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 dsl.