Code Monkey home page Code Monkey logo

Comments (4)

midasklr avatar midasklr commented on August 23, 2024

image
image

请问这是什么原因呢?谢谢版主~

prune ratio太高, 可以根据log中推荐的ratio, 一个基本的准则是每层bn至少保留一个channel,你的model17.cv1.bn层全被剪掉了.

from yolov5prune.

yanggui19891007 avatar yanggui19891007 commented on August 23, 2024

好的,谢谢版主,剪纸完了后又出现这个错误是什么原因啊?麻烦版主帮我看看谢谢
IndexError: too many indices for tensor of dimension 3
image

from yolov5prune.

yanggui19891007 avatar yanggui19891007 commented on August 23, 2024

这个地方报错是不是写错了bug,要把pruned_layer.weight.data = w[:,formerin, :, :].clone()改成pruned_layer.weight.data = w.clone()呢?请版主回复一下谢谢~
image

from yolov5prune.

midasklr avatar midasklr commented on August 23, 2024

这个地方报错是不是写错了bug,要把pruned_layer.weight.data = w[:,formerin, :, :].clone()改成pruned_layer.weight.data = w.clone()呢?请版主回复一下谢谢~
image

对的,因为你这里有一层bn只剩下一个channel,导致w索引后张量w变成了3维,已经修复:02729d3#diff-ef54babcc6303af9a9ef15daccc24d8a03b5185088c609df96cedbfb41ea3755R476
git pull一下最新代码

from yolov5prune.

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.