Code Monkey home page Code Monkey logo

Comments (18)

EthanZhangYC avatar EthanZhangYC commented on May 24, 2024

Hi,

the "cov53.pt" in the code was actually for testing, which I mistakenly uploaded it. Really sorry about that. Code has been corrected, please contact us if you have more questions.

Thanks for correcting~

from hrank.

BlossomingL avatar BlossomingL commented on May 24, 2024

I have another problem, when I test the accuracy of pretrained resnet-50 on imagenet you provided, but the accuracy is just 0.0899, it's too low?

from hrank.

lmbxmu avatar lmbxmu commented on May 24, 2024

I have another problem, when I test the accuracy of pretrained resnet-50 on imagenet you provided, but the accuracy is just 0.0899, it's too low?

Make sure you are using our data processing code and your imagenet is fine. Everything goes smooth in our testing.

from hrank.

BlossomingL avatar BlossomingL commented on May 24, 2024

Thanks for your quick reply!
I run your code just change the pretrained model path and dataset path, my imagenet testset was downloaded from official website named 'ILSVRC2012_img_val.tar'(size: 6.7GB) , is anything wrong?

from hrank.

lmbxmu avatar lmbxmu commented on May 24, 2024

Thanks for your quick reply!
I run your code just change the pretrained model path and dataset path, my imagenet testset was downloaded from official website named 'ILSVRC2012_img_val.tar'(size: 6.7GB) , is anything wrong?

I don't think this is our problem. Many readers adopt our pre-trained model and nothing goes wrong in our communication. You need to check your usage.

from hrank.

lmbxmu avatar lmbxmu commented on May 24, 2024

I have found my mistake: when I untar my validation dataset from official website(6.3GB) , just a single folder, under the folder just many images, it's different from train dataset(there are many subfolders), can you tell me I am right?

老兄啊,你可以直接说中文. 一堆语法错误看不懂你在说什么.

from hrank.

BlossomingL avatar BlossomingL commented on May 24, 2024

哈哈^-^
就是说我在官网下载的测试数据集解压过后只有一个文件夹,下面全是图片,代码读取图片是用ImageFolder读的,所以得把测试数据集按照标签分一下类,放到对应的类下面去。。。

from hrank.

lmbxmu avatar lmbxmu commented on May 24, 2024

正常是同一个类别的数据放在一个文件里. 你需要分类下.

from hrank.

BlossomingL avatar BlossomingL commented on May 24, 2024

好的,知道了,谢谢

from hrank.

lmbxmu avatar lmbxmu commented on May 24, 2024

好的,知道了,谢谢

不客气,有问题再留言~ 你也可以参考这个代码 https://github.com/lmbxmu/HRankPlus

from hrank.

BlossomingL avatar BlossomingL commented on May 24, 2024

我刚刚测试了一下,发现精度还是不对,你能把你的测试集文件目录给我看看嘛?

from hrank.

lmbxmu avatar lmbxmu commented on May 24, 2024

图片无法上传. 请联系你身边的人. 这是常识性问题,不属于我们代码bug范围.

from hrank.

BlossomingL avatar BlossomingL commented on May 24, 2024

好的,已经解决了,主要之前没做过分类的实验。。。麻烦你了!

from hrank.

lmbxmu avatar lmbxmu commented on May 24, 2024

好的,已经解决了,主要之前没做过分类的实验。。。麻烦你了!

不客气~ 任何关于我们代码和论文的问题,欢迎随时提问交流

from hrank.

BlossomingL avatar BlossomingL commented on May 24, 2024

Hi~
你好,在main.py中第272行的for循环代码中,m.layer_mask将指定层的通道剪枝即w置为0,然后你加载了权重文件
问题一:在此处加载权重是否会覆盖之前已经剪枝为0的参数?
这个问题我后来想通了,m.layer_mask中其实生成了一个self.mask,在后面train的时候才会根据这个mask来进行剪枝。
问题二:在train代码中,为什么把m.grad_mask放在outputs=net(inputs)之后呢?这样在训练第一个batch的时候不就不是基于剪枝的权重(虽然这样不是不可以。。。)

from hrank.

lmbxmu avatar lmbxmu commented on May 24, 2024

Hi~
你好,在main.py中第272行的for循环代码中,m.layer_mask将指定层的通道剪枝即w置为0,然后你加载了权重文件
问题一:在此处加载权重是否会覆盖之前已经剪枝为0的参数?
这个问题我后来想通了,m.layer_mask中其实生成了一个self.mask,在后面train的时候才会根据这个mask来进行剪枝。
问题二:在train代码中,为什么把m.grad_mask放在outputs=net(inputs)之后呢?这样在训练第一个batch的时候不就不是基于剪枝的权重(虽然这样不是不可以。。。)

想通的、可以的。 都没有留言的必要

from hrank.

BlossomingL avatar BlossomingL commented on May 24, 2024

你好,我复现了一下ResNet-50在ImageNet上的剪枝实验,但是精度并没有达到文中那么高,大概低了4个点,我每层剪完后训练15个epoch,请问是不是要增加训练的epoch呢?

from hrank.

lmbxmu avatar lmbxmu commented on May 24, 2024

你好,我复现了一下ResNet-50在ImageNet上的剪枝实验,但是精度并没有达到文中那么高,大概低了4个点,我每层剪完后训练15个epoch,请问是不是要增加训练的epoch呢?

大哥,你是怎么跑的能跑成这样. 麻烦移驾 https://github.com/lmbxmu/HRankPlus 看参数配置. 还有我实在不明白为什么微信留言下消失了一下又跑这里来???

from hrank.

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.