Code Monkey home page Code Monkey logo

Comments (15)

lzx101 avatar lzx101 commented on July 28, 2024

是不是ema.py文件

from dsl.

lzx101 avatar lzx101 commented on July 28, 2024

if not self.every_n_iters(runner, self.interval):
大佬好,我想知道every_n_iters是聚合教师的关键代码吗,但是我找不到位置

from dsl.

chenbinghui1 avatar chenbinghui1 commented on July 28, 2024

@lzx101 聚合教师请看这个issue
#7 (comment)

from dsl.

lzx101 avatar lzx101 commented on July 28, 2024

非常感谢您的回复,我还有一个疑问,EMAHook是原本的EMA吗,然后resnet_rla.py关于聚合教师的代码在哪一块呀?感谢大佬

from dsl.

chenbinghui1 avatar chenbinghui1 commented on July 28, 2024

@lzx101
[1]是的
[2]resnet_rla.py:
def _forward_impl(self, x):

from dsl.

lzx101 avatar lzx101 commented on July 28, 2024

感谢大佬,我再去细看一下

from dsl.

lzx101 avatar lzx101 commented on July 28, 2024

大佬你好,我有一个疑问,聚合教师的公式是这样的: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.

lzx101 avatar lzx101 commented on July 28, 2024

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.

chenbinghui1 avatar chenbinghui1 commented on July 28, 2024

@lzx101
h 用于下一次的x计算

x, y, h = layer(x, h)

from dsl.

lzx101 avatar lzx101 commented on July 28, 2024

@lzx101 h 用于下一次的x计算

x, y, h = layer(x, h)

明白了,謝謝大佬

from dsl.

lzx101 avatar lzx101 commented on July 28, 2024

大佬,我想将聚合教师用于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.

chenbinghui1 avatar chenbinghui1 commented on July 28, 2024

按照readme里
Download ImageNet pre-trained models for initializing DSL
需要下载并加载与训练的resnet_rla模型,不然训练太慢了

from dsl.

lzx101 avatar lzx101 commented on July 28, 2024

你好,我使用了下载并加载与训练的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.

chenbinghui1 avatar chenbinghui1 commented on July 28, 2024

@lzx101 用我的代码训练的话,需要转成dsl 风格的数据

from dsl.

lzx101 avatar lzx101 commented on July 28, 2024

好滴感谢大佬的回复,我再去研究一下

from dsl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.