Giter Site home page Giter Site logo

Comments (5)

Crazylov3 avatar Crazylov3 commented on June 11, 2024

You couldn't use shortcut if you use nn.Sequential :)

from yolor.

alecda573 avatar alecda573 commented on June 11, 2024

@Crazylov3 hey thanks for responding so quickly! Can you explain what is the purpose of the shortcut. So there is no way to replicate shortcut by using the sequential class?

from yolor.

Crazylov3 avatar Crazylov3 commented on June 11, 2024

The main purpose of the shortcut (also known as skip connection) in deep neural networks is to help with the flow of information and improve gradient flow during training. In particular, it helps to address the problem of vanishing gradients, which can occur when training very deep neural networks. The idea behind the shortcut is to create a direct connection between the input and output of a block of layers, allowing information to flow directly from one layer to another without having to pass through several intermediate layers. This can help to preserve information and gradients as they propagate through the network, which can lead to more stable and efficient training.

from yolor.

alecda573 avatar alecda573 commented on June 11, 2024

@Crazylov3 so it seems in the config files the shortcut appears after two consectutive conv layers, can this be replaced in the config files by Bottleneck block seen in yolov7 repo here: https://github.com/WongKinYiu/yolov7/blob/main/models/common.py
and then one could use nn.Sequential inplace of nn.ModuleList?

from yolor.

Crazylov3 avatar Crazylov3 commented on June 11, 2024

In general, you can use shortcut everywhere you want. If you have only 1 configs, it will easy to implement shortcut in a block, then you can put these block into nn.Sequential(). However, in this case, there are a lot of configs file, using nn.Sequential() for all may be hard in implementation term. The purpose of their implementation is resuse the code (1 source code for all configs)

from yolor.

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.