Giter VIP home page Giter VIP logo

Comments (6)

positive666 avatar positive666 commented on May 14, 2024

em..整个是根据你的通道数和分辨率设定的,因为在您的实验里开启了MHSA后,可学习的位置编码是相对固定的维度,导致了tensor维度会错,两种解决方式:一种参考我添加的swin,自己手动调整;其次是在函数里写成动态更新分辨率,因为出了swin和我手头项目太多就搁置了优化 看时间我后会更新这个问题;目前的代码里是默认取消了,因为多头注意力机制在深层的使用是为了降低计算量,且那个位置的编码信息可能对模型的影响不大了

from yolo_research.

Seperendity avatar Seperendity commented on May 14, 2024

from yolo_research.

positive666 avatar positive666 commented on May 14, 2024

非常感谢您的解答,我尝试一下您说的方案。关于位置编码我看很多论文加上位置编码检测效果往往会更好,所以想看看跑跑看看。

------------------ 原始邮件 ------------------ 发件人: "positive666/yolov5" @.>; 发送时间: 2022年3月10日(星期四) 下午3:52 @.>; @.@.>; 主题: Re: [positive666/yolov5] 您好,请问下mhsa使用位置编码,调试显示content和position维度相同,但运行会报维度不匹配的问题是什么原因呢 (Issue #4) em..整个是根据你的通道数设定的,因为在您的实验里开启了MHSA后,可学习的位置编码是相对固定的维度,导致了tensor维度会错,两种解决方式:一种参考我添加的swin,自己手动调整;其次是在函数里写成动态更新分辨率,因为出了swin和我手头项目太多就搁置了优化 看时间我后会更新这个问题;目前的代码里是默认取消了,因为多头注意力机制在深层的使用是为了降低计算量,且那个位置的编码信息可能对模型的影响不大了 — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

这个不好说,因为你提的这个思路 我去年就是这么想的 但是后来我想了下,在模型深层的Positon embeds 也许没有那么重要 我认为混合的形式其实本质上意义不大, 浅层的CNN也许可以做的很好了 如果不用swin的话 那么sA也只能作为深层用了 因为SWIN设计也只是仿照CNN的层次化 对于featuremap核心还是sA的作用和positon emebeds,但是这个是特殊情况,所以深层我认为没有必要,理论上应该推翻,直接一个全transformer的backbone才有挑战 类似和swin一样。 swinv2的位置编码方式也是从新把1.0的推翻了

from yolo_research.

Seperendity avatar Seperendity commented on May 14, 2024

from yolo_research.

positive666 avatar positive666 commented on May 14, 2024

嗯您分析的很有道理,不过位置编码这块的解释性还是挺弱的,还是要在一些通用型数据集上验证一下。直觉上我觉得深层学到的这些语义之间的相对关系对网络还是很有帮助的,比如BOTNet和CotNet这两篇论文在检测任务上的实验

------------------ 原始邮件 ------------------ 发件人: "positive666/yolov5" @.>; 发送时间: 2022年3月10日(星期四) 下午5:47 @.>; @.@.>; 主题: Re: [positive666/yolov5] 您好,请问下mhsa使用位置编码,调试显示content和position维度相同,但运行会报维度不匹配的问题是什么原因呢 (Issue #4) 非常感谢您的解答,我尝试一下您说的方案。关于位置编码我看很多论文加上位置编码检测效果往往会更好,所以想看看跑跑看看。 … ------------------ 原始邮件 ------------------ 发件人: "positive666/yolov5" @.>; 发送时间: 2022年3月10日(星期四) 下午3:52 @.>; @.@.>; 主题: Re: [positive666/yolov5] 您好,请问下mhsa使用位置编码,调试显示content和position维度相同,但运行会报维度不匹配的问题是什么原因呢 (Issue #4) em..整个是根据你的通道数设定的,因为在您的实验里开启了MHSA后,可学习的位置编码是相对固定的维度,导致了tensor维度会错,两种解决方式:一种参考我添加的swin,自己手动调整;其次是在函数里写成动态更新分辨率,因为出了swin和我手头项目太多就搁置了优化 看时间我后会更新这个问题;目前的代码里是默认取消了,因为多头注意力机制在深层的使用是为了降低计算量,且那个位置的编码信息可能对模型的影响不大了 — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.> 这个不好说,因为你提的这个思路 我去年就是这么想的 但是后来我想了下,在模型深层的Positon embeds 也许没有那么重要 我认为混合的形式其实本质上意义不大, 浅层的CNN也许可以做的很好了 如果不用swin的话 那么sA也只能作为深层用了 因为SWIN设计也只是仿照CNN的层次化 对于featuremap核心还是sA的作用和positon emebeds,但是这个是特殊情况,所以深层我认为没有必要,理论上应该推翻,直接一个全transformer的backbone才有挑战 类似和swin一样。 swinv2的位置编码方式也是从新把1.0的推翻了 — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.>

em.这个结论我也是参考别人的,忘记了是参考哪个文章的实验了,不过现在还是CNN主流 swin也好 GFLOPs还是大了点( 目前使用角度的话 就是作为插件层自己设计使用的话是最好训练最容易出成果的 ) 理论上都强调自注意力层的长距离依赖 还有就是其实你想提高模型特征提取的性能 可以多做shortcut和残差的设计 就现在设计要考虑实用性角度:有效且同时减小Gflops

from yolo_research.

github-actions avatar github-actions commented on May 14, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from yolo_research.

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.